16 protected $nr = array();
26 $this->list_class[0] =
"il_Explorer";
27 $this->childs[0] = array();
37 $this->item_class = $a_val;
58 $this->list_class[$a_depth] = $a_val;
68 return $this->list_class[$a_depth];
80 $this->childs[$a_parent][] = $a_id;
90 $this->auto_numbering = $a_val;
122 $tpl =
new ilTemplate(
"tpl.nested_list.html",
true,
true,
"Services/UIComponent/NestedList");
126 if (is_array($this->childs[0]) && count($this->childs[0]) > 0) {
128 foreach ($this->childs[0] as $child) {
145 if (!isset(
$nr[$depth])) {
153 for (
$i = 1;
$i <= $depth;
$i++) {
154 $nr_str .= $sep .
$nr[
$i];
160 $tpl->setCurrentBlock(
"content");
161 $tpl->setVariable(
"CONTENT", $nr_str .
" " . $this->nodes[$a_id]);
162 $this->nr[$a_id] = $nr_str;
164 $tpl->parseCurrentBlock();
165 $tpl->touchBlock(
"tag");
167 if (is_array($this->childs[$a_id]) && count($this->childs[$a_id]) > 0) {
169 foreach ($this->childs[$a_id] as $child) {
174 unset(
$nr[$depth + 1]);
188 $tpl->setCurrentBlock(
"list_item_start");
190 $tpl->parseCurrentBlock();
192 $tpl->touchBlock(
"list_item_start");
194 $tpl->touchBlock(
"tag");
205 $tpl->touchBlock(
"list_item_end");
206 $tpl->touchBlock(
"tag");
224 $tpl->setCurrentBlock(
"list_start");
225 $tpl->setVariable(
"UL_CLASS",
' class="' . $class .
'" ');
226 $tpl->parseCurrentBlock();
228 $tpl->touchBlock(
"list_start");
230 $tpl->touchBlock(
"tag");
242 $tpl->touchBlock(
"list_end");
243 $tpl->touchBlock(
"tag");
listItemStart($tpl)
List item start.
getItemClass()
Get li class.
setItemClass($a_val)
Set li class.
addListNode($a_content, $a_id, $a_parent=0)
Add list node.
setAutoNumbering($a_val)
Set auto numbering.
renderNode($a_id, $tpl, $depth, &$nr)
Render node.
special template class to simplify handling of ITX/PEAR
__constructor()
Constructor.
listItemEnd($tpl)
List item end.
getAutoNumbering()
Get auto numbering.
getListClass($a_depth=0)
Get list class.
listStart($tpl, $depth)
List start.
setListClass($a_val, $a_depth=0)
Set list class.