ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilContObjLocatorGUI Class Reference

Content Object Locator GUI. More...

+ Collaboration diagram for ilContObjLocatorGUI:

Public Member Functions

 __construct ($a_tree)
 
 setTemplateVariable ($a_temp_var)
 
 setObjectID ($a_obj_id)
 
 setContentObject ($a_cont_obj)
 
 display ($a_gui_class)
 display locator More...
 

Data Fields

 $mode
 
 $temp_var
 
 $tree
 
 $lng
 
 $tpl
 

Protected Attributes

 $ctrl
 

Detailed Description

Content Object Locator GUI.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilContObjLocatorGUI::__construct (   $a_tree)

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

48 {
49 global $DIC;
50
51 $lng = $DIC->language();
52 $tpl = $DIC["tpl"];
53 $ilCtrl = $DIC->ctrl();
54
55 $this->ctrl = $ilCtrl;
56 $this->tree = $a_tree;
57 $this->mode = "std";
58 $this->temp_var = "LOCATOR";
59 $this->lng = $lng;
60 $this->tpl = $tpl;
61 $this->show_user = false;
62 }
global $ilCtrl
Definition: ilias.php:18
$DIC
Definition: xapitoken.php:46

References $DIC, $ilCtrl, $lng, and $tpl.

Member Function Documentation

◆ display()

ilContObjLocatorGUI::display (   $a_gui_class)

display locator

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

83 {
85
86 $this->tpl->addBlockFile($this->temp_var, "locator", "tpl.locator.html", "Services/Locator");
87
88 if (($this->obj_id != 0) && $this->tree->isInTree($this->obj_id)) {
89 $path = $this->tree->getPathFull($this->obj_id);
90 } else {
91 $path = $this->tree->getPathFull($this->tree->getRootId());
92 if ($this->obj_id != 0) {
93 $path[] = array("type" => "pg", "child" => $this->obj_id,
94 "title" => ilLMPageObject::_getPresentationTitle($this->obj_id));
95 }
96 }
97
98 $modifier = 1;
99
100 foreach ($path as $key => $row) {
101 if ($key < count($path) - $modifier) {
102 $this->tpl->touchBlock("locator_separator");
103 }
104
105 $this->tpl->setCurrentBlock("locator_item");
106 $transit = "";
107 if ($row["child"] == 1) {
108 $title = $this->cont_obj->getTitle();
109 $cmd = "properties";
110 $cmdClass = $a_gui_class;
111 } else {
112 $title = $row["title"];
113 switch ($row["type"]) {
114 case "st":
115 $cmdClass = "ilStructureObjectGUI";
116 $cmd = "view";
117 if ($this->ctrl->getCmdClass() != "ilstructureobjectgui") {
118 $transit = array($a_gui_class);
119 }
120 break;
121
122 case "pg":
123 $cmdClass = "ilLMPageObjectGUI";
124 $cmd = "view";
125 if ($this->ctrl->getCmdClass() != "illmpageobjectgui") {
126 $transit = array($a_gui_class);
127 }
128 break;
129 }
130 }
131 $this->tpl->setVariable("ITEM", $title);
132 $obj_str = ($row["child"] == 1)
133 ? ""
134 : "&obj_id=" . $row["child"];
135
136 $this->ctrl->setParameterByClass($cmdClass, "obj_id", $row["child"]);
137 $link = $this->ctrl->getLinkTargetByClass($cmdClass, $cmd, $transit);
138 $this->ctrl->setParameterByClass($cmdClass, "obj_id", $_GET["obj_id"]);
139 $this->tpl->setVariable("LINK_ITEM", $link);
140 $this->tpl->parseCurrentBlock();
141 }
142
143 $this->tpl->setCurrentBlock("locator");
144 $this->tpl->parseCurrentBlock();
145 }
$_GET["client_id"]
static _getPresentationTitle( $a_pg_id, $a_mode=self::CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-", $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...

References $_GET, $lng, and ilLMPageObject\_getPresentationTitle().

+ Here is the call graph for this function:

◆ setContentObject()

ilContObjLocatorGUI::setContentObject (   $a_cont_obj)

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

75 {
76 $this->cont_obj = $a_cont_obj;
77 }

◆ setObjectID()

ilContObjLocatorGUI::setObjectID (   $a_obj_id)

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

70 {
71 $this->obj_id = $a_obj_id;
72 }

◆ setTemplateVariable()

ilContObjLocatorGUI::setTemplateVariable (   $a_temp_var)

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

65 {
66 $this->temp_var = $a_temp_var;
67 }

Field Documentation

◆ $ctrl

ilContObjLocatorGUI::$ctrl
protected

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

◆ $lng

ilContObjLocatorGUI::$lng

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

Referenced by __construct(), and display().

◆ $mode

ilContObjLocatorGUI::$mode

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

◆ $temp_var

ilContObjLocatorGUI::$temp_var

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

◆ $tpl

ilContObjLocatorGUI::$tpl

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

Referenced by __construct().

◆ $tree

ilContObjLocatorGUI::$tree

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


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