public function renderSubMenuContent() { $html = '<ul class="treeview-menu">'; foreach ($this->items as $item) { $html .= NavItem::widget($item); } $html .= '</ul>'; return $html; }
public function run() { if ($this->items == null || !is_array($this->items)) { return ''; } $itemContent = ''; foreach ($this->items as $item) { if (!is_array($item)) { $itemContent .= $item; } else { $itemContent .= NavItem::widget($item); } } return Html::tag('ul', $itemContent, $this->options); }