28 protected array
$nr = array();
34 $this->list_class[0] =
"il_Explorer";
35 $this->childs[0] = array();
41 $this->item_class = $a_val;
50 public function setListClass(
string $a_val,
int $a_depth = 0): void
52 $this->list_class[$a_depth] = $a_val;
57 return $this->list_class[$a_depth] ??
"";
65 $this->nodes[$a_id] = $a_content;
66 $this->childs[$a_parent][] = $a_id;
71 $this->auto_numbering = $a_val;
86 $tpl =
new ilTemplate(
"tpl.nested_list.html",
true,
true,
"Services/UIComponent/NestedList");
90 if (isset($this->childs[0]) && count($this->childs[0]) > 0) {
92 foreach ($this->childs[0] as $child) {
107 if (!isset($nr[$depth])) {
115 for (
$i = 1;
$i <= $depth;
$i++) {
116 $nr_str .= $sep . $nr[
$i];
123 $tpl->
setVariable(
"CONTENT", $nr_str .
" " . $this->nodes[$a_id]);
124 $this->nr[$a_id] = $nr_str;
129 if (isset($this->childs[$a_id]) && count($this->childs[$a_id]) > 0) {
131 foreach ($this->childs[$a_id] as $child) {
132 $this->
renderNode($child, $tpl, $depth + 1, $nr);
136 unset($nr[$depth + 1]);
169 $tpl->
setVariable(
"UL_CLASS",
' class="' . $class .
'" ');
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
listItemStart(ilTemplate $tpl)
setListClass(string $a_val, int $a_depth=0)
renderNode( $a_id, ilTemplate $tpl, int $depth, array &$nr)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addListNode(string $a_content, string $a_id, $a_parent=0)
touchBlock(string $block)
setAutoNumbering(bool $a_val)
setVariable($variable, $value='')
Sets a variable value.
listStart(ilTemplate $tpl, int $depth)
listItemEnd(ilTemplate $tpl)
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
getListClass(int $a_depth=0)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
setItemClass(string $a_val)