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 | |
Definition at line 33 of file class.ilContObjLocatorGUI.php.
| 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().
{
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 | ) |
| 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;
}
| 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.
1.7.1