function display(&$output, $child_Ids) { if (!is_array($child_Ids)) { return; } $first = true; foreach ($child_Ids as $child_Id) { if (!isset($this->IdToKey[$child_Id])) { continue; } $item = $this->items[$this->IdToKey[$child_Id]]; if ($this->class == 'art-hmenu' && !$first && $this->level == 0) { $output .= "\t" . '<li class="art-hmenu-li-separator"><span class="art-hmenu-separator"> </span></li>' . "\n"; } if ($this->class == 'art-vmenu') { if ($this->level == 0) { if (!$first) { $output .= "\t" . '<li class="art-vmenu-separator"><span class="art-vmenu-separator-span"> </span></li>' . "\n"; } } else { if ($this->level == 1 && $first) { $output .= "\t" . '<li class="art-vmenu-separator art-vmenu-separator-first"><span class="art-vmenu-separator-span"> </span></li>' . "\n"; } else { $output .= "\t" . '<li class="art-vsubmenu-separator"><span class="art-vsubmenu-separator-span"> </span></li>' . "\n"; } } } $output .= $item->get_start($this->level); if (($this->depth == 0 || $this->level < $this->depth - 1) && isset($this->child_Ids[$item->id]) && count($this->child_Ids[$item->id]) > 0) { $this->level++; $output .= str_repeat("\t", $this->level) . '<ul' . theme_prepare_attr(array('class' => $item->active ? 'active' : '')) . '>' . "\n"; $this->display($output, $this->child_Ids[$item->id]); $output .= str_repeat("\t", $this->level) . '</ul>' . "\n"; $this->level--; } $output .= $item->get_end($this->level); $first = false; } }
function display(&$output, $child_Ids) { if (!is_array($child_Ids)) { return; } $first = true; foreach ($child_Ids as $child_Id) { if (!isset($this->IdToKey[$child_Id])) { continue; } $item = $this->items[$this->IdToKey[$child_Id]]; $output .= $item->get_start($this->level); if (($this->depth == 0 || $this->level < $this->depth - 1) && isset($this->child_Ids[$item->id]) && count($this->child_Ids[$item->id]) > 0) { $this->level++; /*Jordi*/ //$output .= str_repeat("\t", $this->level) . '<ul ' . theme_prepare_attr(array('class' => ($item->active ? 'active' : ''))) . '>' . "\n"; $output .= str_repeat("\t", $this->level) . '<ul ' . 'data-parent="vmenuwidget-2"' . theme_prepare_attr(array('class' => $item->active ? 'active collapse in' : 'collapse in')) . '>' . "\n"; /*Jordi-fi*/ $this->display($output, $this->child_Ids[$item->id]); $output .= str_repeat("\t", $this->level) . '</ul>' . "\n"; $this->level--; } $output .= $item->get_end($this->level); $first = false; } }
function display(&$output, $child_Ids) { if (!is_array($child_Ids)) { return; } foreach ($child_Ids as $child_Id) { if (!isset($this->IdToKey[$child_Id])) { continue; } $item = $this->items[$this->IdToKey[$child_Id]]; $output .= $item->get_start($this->level); if (($this->depth == 0 || $this->level < $this->depth - 1) && isset($this->child_Ids[$item->id]) && count($this->child_Ids[$item->id]) > 0) { $this->level++; $output .= str_repeat("\t", $this->level) . '<ul' . theme_prepare_attr(array('class' => $item->active ? 'active' : '')) . '>' . "\n"; $this->display($output, $this->child_Ids[$item->id]); $output .= str_repeat("\t", $this->level) . '</ul>' . "\n"; $this->level--; } $output .= $item->get_end($this->level); } }