示例#1
0
文件: Menu.php 项目: jasonlewis/menu
 /**
  * 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>';
 }