Public Member Functions | Data Fields

ilContObjLocatorGUI Class Reference
[Modules/IliasLearningModule]

Content Object Locator GUI. More...

Public Member Functions

 ilContObjLocatorGUI ($a_tree)
 setTemplateVariable ($a_temp_var)
 setObjectID ($a_obj_id)
 setContentObject ($a_cont_obj)
 display ($a_gui_class)
 display locator

Data Fields

 $mode
 $temp_var
 $tree
 $lng
 $tpl

Detailed Description

Content Object Locator GUI.

Author:
Alex Killing <alex.killing@gmx.de>
Version:
Id:
class.ilContObjLocatorGUI.php 11711 2006-07-30 14:11:38Z akill

Definition at line 33 of file class.ilContObjLocatorGUI.php.


Member Function Documentation

ilContObjLocatorGUI::display ( a_gui_class  ) 

display locator

Definition at line 73 of file class.ilContObjLocatorGUI.php.

References $_GET, $cmd, $key, $lng, $row, $title, and ilLMPageObject::_getPresentationTitle().

        {
                global $lng;

                $this->tpl->addBlockFile($this->temp_var, "locator", "tpl.locator.html");

                if (($this->obj_id != 0) && $this->tree->isInTree($this->obj_id))
                {
                        $path = $this->tree->getPathFull($this->obj_id);
                }
                else
                {
                        $path = $this->tree->getPathFull($this->tree->getRootId());
                        if ($this->obj_id != 0)
                        {
                                $path[] = array("type" => "pg", "child" => $this->obj_id,
                                        "title" => ilLMPageObject::_getPresentationTitle($this->obj_id));
                        }
                }

                $modifier = 1;

                foreach ($path as $key => $row)
                {
                        if ($key < count($path)-$modifier)
                        {
                                $this->tpl->touchBlock("locator_separator");
                        }

                        $this->tpl->setCurrentBlock("locator_item");
                        $transit = "";
                        if ($row["child"] == 1)
                        {
                                $title = $this->cont_obj->getTitle();
                                $cmd = "properties";
                                $cmdClass = $a_gui_class;
                        }
                        else
                        {
                                $title = $row["title"];
                                switch($row["type"])
                                {
                                        case "st":
                                                $cmdClass = "ilStructureObjectGUI";
                                                $cmd = "view";
                                                if ($this->ctrl->getCmdClass() != "ilstructureobjectgui")
                                                {
                                                        $transit = array($a_gui_class);
                                                }
                                                break;

                                        case "pg":
                                                $cmdClass = "ilLMPageObjectGUI";
                                                $cmd = "view";
                                                if ($this->ctrl->getCmdClass() != "illmpageobjectgui")
                                                {
                                                        $transit = array($a_gui_class);
                                                }
                                                break;
                                }
                        }
                        $this->tpl->setVariable("ITEM", $title);
                        $obj_str = ($row["child"] == 1)
                                ? ""
                                : "&obj_id=".$row["child"];

                        $this->ctrl->setParameterByClass($cmdClass, "obj_id", $row["child"]);
                        $link = $this->ctrl->getLinkTargetByClass($cmdClass, $cmd, $transit);
                        $this->ctrl->setParameterByClass($cmdClass, "obj_id", $_GET["obj_id"]);
                        $this->tpl->setVariable("LINK_ITEM", $link);
                        $this->tpl->parseCurrentBlock();
                }

                $this->tpl->setCurrentBlock("locator");
                $this->tpl->parseCurrentBlock();
        }

Here is the call graph for this function:

ilContObjLocatorGUI::ilContObjLocatorGUI ( a_tree  ) 

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

References $ilCtrl, $lng, and $tpl.

        {
                global $lng, $tpl, $ilCtrl;

                $this->ctrl =& $ilCtrl;
                $this->tree =& $a_tree;
                $this->mode = "std";
                $this->temp_var = "LOCATOR";
                $this->lng =& $lng;
                $this->tpl =& $tpl;
                $this->show_user = false;
        }

ilContObjLocatorGUI::setContentObject ( a_cont_obj  ) 

Definition at line 65 of file class.ilContObjLocatorGUI.php.

        {
                $this->cont_obj =& $a_cont_obj;
        }

ilContObjLocatorGUI::setObjectID ( a_obj_id  ) 

Definition at line 60 of file class.ilContObjLocatorGUI.php.

        {
                $this->obj_id = $a_obj_id;
        }

ilContObjLocatorGUI::setTemplateVariable ( a_temp_var  ) 

Definition at line 55 of file class.ilContObjLocatorGUI.php.

        {
                $this->temp_var = $a_temp_var;
        }


Field Documentation

ilContObjLocatorGUI::$lng

Definition at line 38 of file class.ilContObjLocatorGUI.php.

Referenced by display(), and ilContObjLocatorGUI().

ilContObjLocatorGUI::$mode

Definition at line 35 of file class.ilContObjLocatorGUI.php.

ilContObjLocatorGUI::$temp_var

Definition at line 36 of file class.ilContObjLocatorGUI.php.

ilContObjLocatorGUI::$tpl

Definition at line 39 of file class.ilContObjLocatorGUI.php.

Referenced by ilContObjLocatorGUI().

ilContObjLocatorGUI::$tree

Definition at line 37 of file class.ilContObjLocatorGUI.php.


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