Overview

Packages

  • Auth
  • Core
  • Horde
    • Imsp
  • None
  • Notification

Classes

  • Horde
  • Horde_Config
  • Horde_Config_Form
  • Horde_Core_ActiveSync_Connector
  • Horde_Core_ActiveSync_Driver
  • Horde_Core_Ajax_Application
  • Horde_Core_Ajax_Imple
  • Horde_Core_Ajax_Imple_AutoCompleter
  • Horde_Core_Ajax_Imple_Geocoder_Geonames
  • Horde_Core_Ajax_Imple_SpellChecker
  • Horde_Core_Alarm_Handler_Notify
  • Horde_Core_Auth_Application
  • Horde_Core_Auth_Composite
  • Horde_Core_Auth_Ldap
  • Horde_Core_Auth_Msad
  • Horde_Core_Auth_Shibboleth
  • Horde_Core_Auth_Signup_Base
  • Horde_Core_Auth_Signup_Form
  • Horde_Core_Auth_Signup_Null
  • Horde_Core_Auth_Signup_Sql
  • Horde_Core_Auth_Signup_SqlObject
  • Horde_Core_Autoloader_Callback_Mime
  • Horde_Core_Autoloader_Callback_Nls
  • Horde_Core_Block
  • Horde_Core_Block_Collection
  • Horde_Core_Block_Layout
  • Horde_Core_Block_Layout_Manager
  • Horde_Core_Block_Layout_View
  • Horde_Core_Block_Upgrade
  • Horde_Core_Browser
  • Horde_Core_Bundle
  • Horde_Core_Cli
  • Horde_Core_Controller_NotFound
  • Horde_Core_Controller_RequestConfiguration
  • Horde_Core_Controller_RequestMapper
  • Horde_Core_Controller_SettingsFinder
  • Horde_Core_Db_Migration
  • Horde_Core_Factory_ActiveSyncBackend
  • Horde_Core_Factory_ActiveSyncServer
  • Horde_Core_Factory_ActiveSyncState
  • Horde_Core_Factory_Ajax
  • Horde_Core_Factory_Alarm
  • Horde_Core_Factory_Auth
  • Horde_Core_Factory_AuthSignup
  • Horde_Core_Factory_Base
  • Horde_Core_Factory_BlockCollection
  • Horde_Core_Factory_Browser
  • Horde_Core_Factory_Cache
  • Horde_Core_Factory_Crypt
  • Horde_Core_Factory_Data
  • Horde_Core_Factory_Db
  • Horde_Core_Factory_DbBase
  • Horde_Core_Factory_DbPear
  • Horde_Core_Factory_Dns
  • Horde_Core_Factory_Editor
  • Horde_Core_Factory_Facebook
  • Horde_Core_Factory_Group
  • Horde_Core_Factory_History
  • Horde_Core_Factory_HttpClient
  • Horde_Core_Factory_Identity
  • Horde_Core_Factory_Image
  • Horde_Core_Factory_Imple
  • Horde_Core_Factory_Imsp
  • Horde_Core_Factory_ImspAuth
  • Horde_Core_Factory_Injector
  • Horde_Core_Factory_KolabServer
  • Horde_Core_Factory_KolabSession
  • Horde_Core_Factory_KolabStorage
  • Horde_Core_Factory_Ldap
  • Horde_Core_Factory_Lock
  • Horde_Core_Factory_Logger
  • Horde_Core_Factory_LoginTasks
  • Horde_Core_Factory_Mail
  • Horde_Core_Factory_Mapper
  • Horde_Core_Factory_Matcher
  • Horde_Core_Factory_Memcache
  • Horde_Core_Factory_MimeViewer
  • Horde_Core_Factory_Notification
  • Horde_Core_Factory_Perms
  • Horde_Core_Factory_PermsCore
  • Horde_Core_Factory_Prefs
  • Horde_Core_Factory_Request
  • Horde_Core_Factory_Secret
  • Horde_Core_Factory_SessionHandler
  • Horde_Core_Factory_Share
  • Horde_Core_Factory_ShareBase
  • Horde_Core_Factory_Template
  • Horde_Core_Factory_TextFilter
  • Horde_Core_Factory_ThemesCache
  • Horde_Core_Factory_Token
  • Horde_Core_Factory_Tree
  • Horde_Core_Factory_Twitter
  • Horde_Core_Factory_UrlShortener
  • Horde_Core_Factory_Vfs
  • Horde_Core_Factory_View
  • Horde_Core_Factory_Weather
  • Horde_Core_Group_Ldap
  • Horde_Core_Log_Logger
  • Horde_Core_LoginTasks
  • Horde_Core_LoginTasks_Backend_Horde
  • Horde_Core_LoginTasks_SystemTask_Upgrade
  • Horde_Core_Mime_Viewer_Syntaxhighlighter
  • Horde_Core_Mime_Viewer_Vcard
  • Horde_Core_Notification_Event_Status
  • Horde_Core_Notification_Handler_Decorator_Hordelog
  • Horde_Core_Notification_Storage_Session
  • Horde_Core_Perms
  • Horde_Core_Perms_Ui
  • Horde_Core_Prefs_Cache_Session
  • Horde_Core_Prefs_Identity
  • Horde_Core_Prefs_Storage_Configuration
  • Horde_Core_Prefs_Storage_Hooks
  • Horde_Core_Prefs_Storage_Upgrade
  • Horde_Core_Prefs_Ui
  • Horde_Core_Prefs_Ui_Widgets
  • Horde_Core_Share_Driver
  • Horde_Core_Share_FactoryCallback
  • Horde_Core_Sidebar
  • Horde_Core_Text_Filter_Bbcode
  • Horde_Core_Text_Filter_Emails
  • Horde_Core_Text_Filter_Emoticons
  • Horde_Core_Text_Filter_Highlightquotes
  • Horde_Core_Translation
  • Horde_Core_Tree_Html
  • Horde_Core_Tree_Javascript
  • Horde_Core_Tree_Simplehtml
  • Horde_Core_Ui_FlagImage
  • Horde_Core_Ui_JsCalendar
  • Horde_Core_Ui_Language
  • Horde_Core_Ui_Layout
  • Horde_Core_Ui_ModalFormRenderer
  • Horde_Core_Ui_Pager
  • Horde_Core_Ui_Tabs
  • Horde_Core_Ui_TagCloud
  • Horde_Core_Ui_VarRenderer
  • Horde_Core_Ui_VarRenderer_Html
  • Horde_Core_Ui_VarRenderer_TablesetHtml
  • Horde_Core_Ui_Widget
  • Horde_ErrorHandler
  • Horde_Help
  • Horde_Menu
  • Horde_Registry
  • Horde_Registry_Api
  • Horde_Registry_Application
  • Horde_Registry_Caller
  • Horde_Registry_Nlsconfig
  • Horde_Script_Files
  • Horde_Session
  • Horde_Session_Null
  • Horde_Themes
  • Horde_Themes_Cache
  • Horde_Themes_Css
  • Horde_Themes_Element
  • Horde_Themes_Image
  • Horde_Themes_Sound

Exceptions

  • Horde_Exception_HookNotSet
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Menu

The Horde_Menu:: class provides standardized methods for creating menus in Horde applications.

Copyright 1999-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Package: Core
Category: Horde
Author: Chuck Hagenbuch chuck@horde.org
Author: Jon Parise jon@horde.org
Located at Horde/Menu.php
Methods summary
public
# __construct( integer $mask = Horde_Menu::MASK_ALL )

Constructor.

Constructor.

Parameters

$mask
Display mask.
public
# setMask( integer $mask )

Sets the display mask.

Sets the display mask.

Parameters

$mask
Display mask.

Since

Horde_Core 1.3.0
public integer
# add( string $url, string $text, string $icon = '', string $icon_path = null, string $target = '', string $onclick = null, string $class = null )

Add an item to the menu array.

Add an item to the menu array.

Parameters

$url
String containing the value for the hyperlink.
$text
<p>String containing the label for this menu item.</p>
$icon
<p>String containing the filename of the image icon to display for this menu item.</p>
$icon_path
<p>If the icon lives in a non-default directory, where is it?</p>
$target
<p>If the link needs to open in another frame or window, what is its name?</p>
$onclick
Onclick javascript, if desired.
$class
CSS class for the menu item.

Returns

integer

The id (NOT guaranteed to be an array index) of the item just added to the menu.

public integer
# addArray( array $item )

Add an item to the menu array.

Add an item to the menu array.

Parameters

$item
The item to add. Valid keys: <pre><span class="php-quote">'class'</span> - (string) CSS classname. <span class="php-quote">'icon'</span> - (string) Filename of the image icon. <span class="php-quote">'icon_path'</span> - (string) Non-<span class="php-keyword1">default</span> directory path <span class="php-keyword1">for</span> icon. <span class="php-quote">'onclick'</span> - (string) Onclick javascript. <span class="php-quote">'target'</span> - (string) HREF target parameter. <span class="php-quote">'text'</span> - (string) Label. <span class="php-quote">'url'</span> - (string) Hyperlink.</pre>

Returns

integer

The id (NOT guaranteed to be an array index) of the item just added to the menu.

public
# setPosition( mixed $id, mixed $pos )

TODO

TODO

public string
# render( )

Return the rendered representation of the menu items.

Return the rendered representation of the menu items.

Returns

string
The rendered representation.
public
# addAppLinks( )

Add links to other Horde applications defined in an application's config file.

Add links to other Horde applications defined in an application's config file.

public array
# getAppLinks( )

List any links to other Horde applications defined in an application's config file.

List any links to other Horde applications defined in an application's config file.

Returns

array
A list of applications to create menu items for.
public
# addSiteLinks( )

Add links found in the application's menu configuration.

Add links found in the application's menu configuration.

public array
# getSiteLinks( )

Get the list of site links to add to the menu.

Get the list of site links to add to the menu.

Returns

array
A list of menu items to add.
public static boolean
# isSelected( mixed $url )

Checks to see if the current url matches the given url.

Checks to see if the current url matches the given url.

Returns

boolean
Whether the given URL is the current location.
public static boolean
# showService( string $type )

TODO

TODO

Parameters

$type
The type of link. <pre>The following must be <span class="php-keyword2">defined</span> in Horde<span class="php-quote">'s menu config, or else they won'</span>t be displayed in the menu: <span class="php-quote">'help'</span>, <span class="php-quote">'problem'</span>, <span class="php-quote">'logout'</span>, <span class="php-quote">'login'</span>, <span class="php-quote">'prefs'</span></pre>

Returns

boolean
True if the link is to be shown.
Constants summary
integer MASK_NONE

Don't show any menu items.

Don't show any menu items.

# 0
integer MASK_HELP

Show help menu item.

Show help menu item.

# 1
integer MASK_LOGIN

Show login/logout menu item.

Show login/logout menu item.

# 2
integer MASK_PREFS

Show preferences menu item.

Show preferences menu item.

# 4
integer MASK_PROBLEM

Show problem reporting menu item.

Show problem reporting menu item.

# 8
integer MASK_BASE

Only show application specific menu items.

Only show application specific menu items.

# 16
integer MASK_ALL

Show all menu items.

Show all menu items.

# 31
integer POS_LAST
# 999
API documentation generated by ApiGen