Horde_Menu::render PHP Method

render() public method

Return the rendered representation of the menu items.
public render ( ) : Horde_View_Sidebar
return Horde_View_Sidebar Sidebar view of menu elements.
    public function render()
    {
        /* Add any custom menu items. */
        $this->addSiteLinks();
        /* Sort to match explicitly set positions. */
        ksort($this->_menu);
        if ($GLOBALS['registry']->nlsconfig->curr_rtl) {
            $this->_menu = array_reverse($this->_menu);
        }
        return $this->_render();
    }

Usage Example

Esempio n. 1
0
 function getMenu($returnType = 'object')
 {
     global $registry;
     $menu = new Horde_Menu();
     $menu->addArray(array('url' => Horde::url('summary.php'), 'text' => _("Summary"), 'icon' => 'fax.png'));
     $menu->addArray(array('url' => Horde::url('folder.php'), 'text' => _("Folders"), 'icon' => 'folder.png'));
     $menu->addArray(array('url' => Horde::url('compose.php'), 'text' => _("Compose"), 'icon' => 'compose.png'));
     if ($returnType == 'object') {
         return $menu;
     } else {
         return $menu->render();
     }
 }
All Usage Examples Of Horde_Menu::render