Public Member Functions | |
| ilTabsGUI () | |
| Constructor public. | |
| getTargetsByObjectType (&$a_gui_obj, $a_type) | |
| addTarget ($a_text, $a_link, $a_cmd="", $a_cmdClass="", $a_frame="") | |
| getHTML () | |
Data Fields | |
| $target_script | |
| $obj_type | |
| $tpl | |
| $lng | |
| $tabs | |
| $objDefinition | |
| $target = array() | |
Definition at line 33 of file class.ilTabsGUI.php.
| ilTabsGUI::addTarget | ( | $ | a_text, | |
| $ | a_link, | |||
| $ | a_cmd = "", |
|||
| $ | a_cmdClass = "", |
|||
| $ | a_frame = "" | |||
| ) |
Definition at line 163 of file class.ilTabsGUI.php.
Referenced by getTargetsByObjectType().
{
$a_cmdClass = strtolower($a_cmdClass);
$this->target[] = array("text" => $a_text, "link" => $a_link,
"cmd" => $a_cmd, "cmdClass" => $a_cmdClass, "frame" => $a_frame);
//echo "<br>addTarget:".$a_link."::";
}
Here is the caller graph for this function:| ilTabsGUI::getHTML | ( | ) |
Definition at line 172 of file class.ilTabsGUI.php.
References $cmd, $ilCtrl, $lng, $target, and $tpl.
{
global $ilCtrl, $lng;
$cmd = $ilCtrl->getCmd();
$cmdClass = $ilCtrl->getCmdClass();
$tpl = new ilTemplate("tpl.tabs.html", true, true);
foreach ($this->target as $target)
{
$i++;
if (!is_array($target["cmd"]))
{
$target["cmd"] = array($target["cmd"]);
}
//echo "<br>-".$target["cmd"]."-".$cmd."-";
if (in_array($cmd, $target["cmd"]) &&
($target["cmdClass"] == $cmdClass || $target["cmdClass"] == ""))
{
$tabtype = "tabactive";
}
else
{
$tabtype = "tabinactive";
}
$tpl->setCurrentBlock("tab");
$tpl->setVariable("TAB_TYPE", $tabtype);
$tpl->setVariable("TAB_LINK", $target["link"]);
$tpl->setVariable("TAB_TEXT", $lng->txt($target["text"]));
$tpl->setVariable("TAB_TARGET", $target["frame"]);
$tpl->parseCurrentBlock();
}
return $tpl->get();
}
| ilTabsGUI::getTargetsByObjectType | ( | &$ | a_gui_obj, | |
| $ | a_type | |||
| ) |
Definition at line 149 of file class.ilTabsGUI.php.
References $d, $ilCtrl, $row, and addTarget().
{
global $ilCtrl;
$d = $this->objDefinition->getProperties($a_type);
foreach ($d as $key => $row)
{
$this->addTarget($row["lng"],
$ilCtrl->getLinkTarget($a_gui_obj, $row["name"]),
$row["name"], get_class($a_gui_obj));
}
}
Here is the call graph for this function:| ilTabsGUI::ilTabsGUI | ( | ) |
Constructor public.
Definition at line 47 of file class.ilTabsGUI.php.
References $lng, $objDefinition, and $tpl.
{
global $tpl, $objDefinition, $lng;
$this->tpl =& $tpl;
$this->lng =& $lng;
$this->objDefinition =& $objDefinition;
$this->temp_var = "TABS";
}
| ilTabsGUI::$lng |
Definition at line 38 of file class.ilTabsGUI.php.
Referenced by getHTML(), and ilTabsGUI().
| ilTabsGUI::$obj_type |
Definition at line 36 of file class.ilTabsGUI.php.
| ilTabsGUI::$objDefinition |
Definition at line 40 of file class.ilTabsGUI.php.
Referenced by ilTabsGUI().
| ilTabsGUI::$tabs |
Definition at line 39 of file class.ilTabsGUI.php.
| ilTabsGUI::$target = array() |
Definition at line 41 of file class.ilTabsGUI.php.
Referenced by getHTML().
| ilTabsGUI::$target_script |
Definition at line 35 of file class.ilTabsGUI.php.
| ilTabsGUI::$tpl |
Definition at line 37 of file class.ilTabsGUI.php.
Referenced by getHTML(), and ilTabsGUI().
1.7.1