Exemple #1
0
 public function renderSubMenuContent()
 {
     $html = '<ul class="treeview-menu">';
     foreach ($this->items as $item) {
         $html .= NavItem::widget($item);
     }
     $html .= '</ul>';
     return $html;
 }
Exemple #2
0
 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);
 }