Public Member Functions | Data Fields

ilLMMenuObjectSelector Class Reference
[Modules/IliasLearningModule]

LM Menu Object Selector. More...

Inheritance diagram for ilLMMenuObjectSelector:
Collaboration diagram for ilLMMenuObjectSelector:

Public Member Functions

 ilLMMenuObjectSelector ($a_target, &$a_gui_obj)
 Constructor public.
 setSelectableTypes ($a_types)
 setRefId ($a_ref_id)
 buildLinkTarget ($a_node_id, $a_type)
 get link target (may be overwritten by derived classes)
 buildFrameTarget ($a_type, $a_child=0, $a_obj_id=0)
 get frame target (may be overwritten by derived classes)
 isClickable ($a_type, $a_ref_id)
 check if links for certain object type are activated
 showChilds ($a_ref_id)
 determines wether the childs of an object should be shown or not note: this standard implementation always returns true but it could be overwritten by derived classes (e.g.
 formatHeader ($a_obj_id, $a_option)
 overwritten method from base class public

Data Fields

 $root_id
 $output
 $ctrl
 $selectable_type
 $ref_id

Detailed Description

LM Menu Object Selector.

Author:
Sascha Hofmann <saschahofmann@gmx.de>
Version:
Id:
class.ilLMMenuObjectSelector.php 11711 2006-07-30 14:11:38Z akill

Definition at line 34 of file class.ilLMMenuObjectSelector.php.


Member Function Documentation

ilLMMenuObjectSelector::buildFrameTarget ( a_type,
a_child = 0,
a_obj_id = 0 
)

get frame target (may be overwritten by derived classes)

Reimplemented from ilExplorer.

Definition at line 91 of file class.ilLMMenuObjectSelector.php.

        {
                return '';
        }

ilLMMenuObjectSelector::buildLinkTarget ( a_node_id,
a_type 
)

get link target (may be overwritten by derived classes)

Reimplemented from ilExplorer.

Definition at line 82 of file class.ilLMMenuObjectSelector.php.

        {
                if(in_array($a_type,$this->selectable_types))
                {
                        $this->ctrl->setParameter($this->gui_obj,'link_ref_id',$a_node_id);
                        return $this->ctrl->getLinkTarget($this->gui_obj,'addMenuEntry');
                }
        }

ilLMMenuObjectSelector::formatHeader ( a_obj_id,
a_option 
)

overwritten method from base class public

Parameters:
integer obj_id
integer array options
Returns:
string

Definition at line 128 of file class.ilLMMenuObjectSelector.php.

References ilExplorer::$ilias, $lng, and $tpl.

        {
                global $lng, $ilias;

                $tpl = new ilTemplate("tpl.tree.html", true, true);

                $tpl->setCurrentBlock("text");
                $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
                $tpl->parseCurrentBlock();

                $tpl->setCurrentBlock("row");
                $tpl->parseCurrentBlock();

                $this->output[] = $tpl->get();
        }

ilLMMenuObjectSelector::ilLMMenuObjectSelector ( a_target,
&$  a_gui_obj 
)

Constructor public.

Parameters:
string scriptname
int user_id

Definition at line 54 of file class.ilLMMenuObjectSelector.php.

References $ilCtrl, ilExplorer::$tree, ilExplorer::addFilter(), ilExplorer::ilExplorer(), and ilExplorer::setSessionExpandVariable().

        {
                global $tree,$ilCtrl;

                $this->ctrl = $ilCtrl;
                
                $this->gui_obj = $a_gui_obj;

                parent::ilExplorer($a_target);
                $this->tree = $tree;
                $this->root_id = $this->tree->readRootId();
                $this->order_column = "title";
                $this->setSessionExpandVariable("lm_menu_expand");
                $this->addFilter("rolf");
                $this->addFilter("adm");
        }

Here is the call graph for this function:

ilLMMenuObjectSelector::isClickable ( a_type,
a_ref_id 
)

check if links for certain object type are activated

Parameters:
string $a_type object type
Returns:
boolean true if linking is activated

Reimplemented from ilExplorer.

Definition at line 96 of file class.ilLMMenuObjectSelector.php.

        {//return true;
                return in_array($a_type,$this->selectable_types) and $a_ref_id != $this->ref_id;
        }

ilLMMenuObjectSelector::setRefId ( a_ref_id  ) 

Definition at line 76 of file class.ilLMMenuObjectSelector.php.

        {
                $this->ref_id = $a_ref_id;
        }

ilLMMenuObjectSelector::setSelectableTypes ( a_types  ) 

Definition at line 71 of file class.ilLMMenuObjectSelector.php.

        {
                $this->selectable_types  = $a_types;
        }

ilLMMenuObjectSelector::showChilds ( a_parent_id  ) 

determines wether the childs of an object should be shown or not note: this standard implementation always returns true but it could be overwritten by derived classes (e.g.

ilRepositoryExplorerGUI)

Reimplemented from ilExplorer.

Definition at line 101 of file class.ilLMMenuObjectSelector.php.

References $rbacsystem.

        {
                global $rbacsystem;

                if ($a_ref_id == 0)
                {
                        return true;
                }

                if ($rbacsystem->checkAccess("read", $a_ref_id))
                {
                        return true;
                }
                else
                {
                        return false;
                }
        }


Field Documentation

ilLMMenuObjectSelector::$ctrl

Definition at line 44 of file class.ilLMMenuObjectSelector.php.

ilLMMenuObjectSelector::$output

Reimplemented from ilExplorer.

Definition at line 43 of file class.ilLMMenuObjectSelector.php.

ilLMMenuObjectSelector::$ref_id

Definition at line 46 of file class.ilLMMenuObjectSelector.php.

ilLMMenuObjectSelector::$root_id

Definition at line 42 of file class.ilLMMenuObjectSelector.php.

ilLMMenuObjectSelector::$selectable_type

Definition at line 45 of file class.ilLMMenuObjectSelector.php.


The documentation for this class was generated from the following file: