Пример #1
0
 /**
  * Render the menu
  *
  * @param Zym_Menu_Abstract $menu
  * @param string $menuClass
  * @param boolean $firstRun
  * @return string
  */
 protected function _renderMenu(Zym_Menu_Abstract $menu, $menuClass, $firstOfType = false)
 {
     $xhtml = sprintf('<div id="Menu%s" class="%s">', $menu->getId(), $menuClass);
     $xhtml .= '<div class="bd"><ul';
     if ($firstOfType) {
         $xhtml .= ' class="first-of-type"';
     }
     $xhtml .= '>';
     if ($menu->hasMenuItems()) {
         $menuItems = $menu->getMenuItems();
         foreach ($menuItems as $menuItem) {
             $xhtml .= $this->_renderMenuItem($menuItem, $menuClass);
         }
     }
     $xhtml .= '</ul></div></div>';
     return $xhtml;
 }