ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
ilContObjLocatorGUI Class Reference

Content Object Locator GUI. More...

+ Collaboration diagram for ilContObjLocatorGUI:

Public Member Functions

 ilContObjLocatorGUI ($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
 

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.

Member Function Documentation

◆ display()

ilContObjLocatorGUI::display (   $a_gui_class)

display locator

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

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

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

◆ ilContObjLocatorGUI()

ilContObjLocatorGUI::ilContObjLocatorGUI (   $a_tree)

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

References $ilCtrl, $lng, and $tpl.

43  {
44  global $lng, $tpl, $ilCtrl;
45 
46  $this->ctrl =& $ilCtrl;
47  $this->tree =& $a_tree;
48  $this->mode = "std";
49  $this->temp_var = "LOCATOR";
50  $this->lng =& $lng;
51  $this->tpl =& $tpl;
52  $this->show_user = false;
53  }
global $ilCtrl
Definition: ilias.php:18

◆ setContentObject()

ilContObjLocatorGUI::setContentObject (   $a_cont_obj)

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

66  {
67  $this->cont_obj =& $a_cont_obj;
68  }

◆ setObjectID()

ilContObjLocatorGUI::setObjectID (   $a_obj_id)

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

61  {
62  $this->obj_id = $a_obj_id;
63  }

◆ setTemplateVariable()

ilContObjLocatorGUI::setTemplateVariable (   $a_temp_var)

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

56  {
57  $this->temp_var = $a_temp_var;
58  }

Field Documentation

◆ $lng

ilContObjLocatorGUI::$lng

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

Referenced by display(), and ilContObjLocatorGUI().

◆ $mode

ilContObjLocatorGUI::$mode

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

◆ $temp_var

ilContObjLocatorGUI::$temp_var

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

◆ $tpl

ilContObjLocatorGUI::$tpl

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

Referenced by ilContObjLocatorGUI().

◆ $tree

ilContObjLocatorGUI::$tree

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


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