Public Member Functions | |
ilPublicSectionSelector ($a_target, &$a_lm_obj, $a_gui_class) | |
Constructor public. | |
formatHeader ($a_obj_id, $a_option) | |
overwritten method from base class public | |
formatObject ($a_node_id, $a_option, $a_obj_id=0) | |
Creates output recursive method private. | |
Data Fields | |
$root_id | |
$output | |
$ctrl | |
$selectable_type | |
$ref_id |
Definition at line 36 of file class.ilPublicSectionSelector.php.
ilPublicSectionSelector::formatHeader | ( | $ | a_obj_id, | |
$ | a_option | |||
) |
overwritten method from base class public
integer | obj_id | |
integer | array options |
Reimplemented from ilLMExplorer.
Definition at line 76 of file class.ilPublicSectionSelector.php.
References ilExplorer::$ilias, $lng, $tpl, and ilUtil::shortenText().
{ global $lng, $ilias; $tpl = new ilTemplate("tpl.tree_form.html", true, true); $tpl->setCurrentBlock("link"); $tpl->setVariable("TITLE", ilUtil::shortenText($this->lm_obj->getTitle(), $this->textwidth, true)); $tpl->setVariable("LINK_TARGET", $this->target); $tpl->setVariable("TARGET", " target=\"".$this->frame_target."\""); $tpl->parseCurrentBlock(); $tpl->setCurrentBlock("row"); $tpl->parseCurrentBlock(); $this->output[] = $tpl->get(); }
ilPublicSectionSelector::formatObject | ( | $ | a_node_id, | |
$ | a_option, | |||
$ | a_obj_id = 0 | |||
) |
Creates output recursive method private.
integer | ||
array |
Reimplemented from ilExplorer.
Definition at line 102 of file class.ilPublicSectionSelector.php.
References $lng, $tpl, ilLMObject::_isPagePublic(), ilUtil::array_php2js(), ilUtil::getImagePath(), and ilUtil::shortenText().
{ global $lng; if (!isset($a_node_id) or !is_array($a_option)) { $this->ilias->raiseError(get_class($this)."::formatObject(): Missing parameter or wrong datatype! ". "node_id: ".$a_node_id." options:".var_dump($a_option),$this->ilias->error_obj->WARNING); } $tpl = new ilTemplate("tpl.tree_form.html", true, true); // build structurs without any icons or lines foreach ($a_option["tab"] as $picture) { $picture = "blank"; $tpl->setCurrentBlock("lines"); $tpl->setVariable("IMGPATH_LINES", ilUtil::getImagePath("browser/".$picture.".gif")); $tpl->parseCurrentBlock(); } if ($this->output_icons) { $tpl->setCurrentBlock("icon"); $tpl->setVariable("ICON_IMAGE" ,ilUtil::getImagePath("icon_".$a_option["type"].".gif")); $tpl->setVariable("PAGE_ID" , $a_node_id); //$this->iconList[] = "iconid_".$a_node_id; $tpl->setVariable("TXT_ALT_IMG", $lng->txt($a_option["desc"])); $tpl->parseCurrentBlock(); } if (!$a_option["container"]) { $tpl->setCurrentBlock("checkbox"); $tpl->setVariable("PAGE_ID", $a_node_id); if (ilLMObject::_isPagePublic($a_node_id)) { $tpl->setVariable("CHECKED","checked=\"checked\""); } $tpl->parseCurrentBlock(); } else { $childs = $this->tree->getChilds($a_node_id); foreach ($childs as $node) { if ($node["type"] == "pg") { $pages[] = $node["child"]; } } $js_pages = ilUtil::array_php2js($pages); $tpl->setVariable("ONCLICK", " onclick=\"alterCheckboxes('PublicSelector','page_',$js_pages); return false;\""); } $tpl->setCurrentBlock("text"); $tpl->setVariable("PAGE_ID", $a_node_id); $tpl->setVariable("OBJ_TITLE", ilUtil::shortenText($a_option["title"], $this->textwidth, true)); $tpl->parseCurrentBlock(); $this->output[] = $tpl->get(); }
ilPublicSectionSelector::ilPublicSectionSelector | ( | $ | a_target, | |
&$ | a_lm_obj, | |||
$ | a_gui_class | |||
) |
Constructor public.
string | scriptname | |
object | lm object | |
string | gui class name |
Definition at line 57 of file class.ilPublicSectionSelector.php.
References $ilCtrl, ilExplorer::forceExpandAll(), ilLMExplorer::ilLMExplorer(), and ilExplorer::setSessionExpandVariable().
{ global $ilCtrl; $this->ctrl =& $ilCtrl; $this->gui_class = $a_gui_class; parent::ilLMExplorer($a_target, $a_lm_obj); $this->forceExpandAll(true); $this->setSessionExpandVariable("lmpublicselectorexpand"); }
ilPublicSectionSelector::$ctrl |
Definition at line 45 of file class.ilPublicSectionSelector.php.
ilPublicSectionSelector::$output |
Reimplemented from ilLMExplorer.
Definition at line 44 of file class.ilPublicSectionSelector.php.
ilPublicSectionSelector::$ref_id |
Definition at line 48 of file class.ilPublicSectionSelector.php.
ilPublicSectionSelector::$root_id |
Reimplemented from ilLMExplorer.
Definition at line 43 of file class.ilPublicSectionSelector.php.
ilPublicSectionSelector::$selectable_type |
Definition at line 47 of file class.ilPublicSectionSelector.php.