Пример #1
0
 /**
  * Render the menu.
  * 
  * @return string
  */
 public function render()
 {
     $attributes = $this->html->attributes($this->attributes);
     $menu[] = "<ul{$attributes}>";
     foreach ($this->items as $item) {
         $menu[] = $item->render();
     }
     $menu[] = '</ul>';
     return implode(PHP_EOL, $menu);
 }
Пример #2
0
 /**
  * Render the menu item.
  * 
  * @return string
  */
 public function render()
 {
     return '<li>' . $this->html->link($this->link, $this->title, $this->attributes) . $this->renderNestedMenu() . '</li>';
 }