Class Menu

Description

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

$Horde: framework/Horde/Horde/Menu.php,v 1.35.2.17 2009/01/06 15:23:10 jan Exp $

Copyright 1999-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /Horde/Horde/Menu.php (line 28)


	
			
Variable Summary
 integer $_mask
 array $_menu
Method Summary
 Menu Menu ([ $mask = HORDE_MENU_MASK_ALL])
 integer add (string $url, string $text, [string $icon = ''], [string $icon_path = null], [string $target = ''], [string $onclick = null], [string $class = null])
 void addAppLinks ()
 integer addArray ( $item, string $url, string $text, string $icon, string $icon_path, string $target, string $onclick, string $class)
 void addSiteLinks ()
 boolean isSelected ( $url)
 string render ()
 void setPosition ( $id,  $pos)
Variables
integer $_mask (line 42)

Mask defining what general Horde links are shown in this Menu.

array $_menu = array() (line 35)

Menu array.

Methods
Constructor Menu (line 47)

Constructor

Menu Menu ([ $mask = HORDE_MENU_MASK_ALL])
  • $mask
add (line 74)

Add an item to the menu array.

  • return: The id (NOT guaranteed to be an array index) of the item just added to the menu.
integer add (string $url, string $text, [string $icon = ''], [string $icon_path = null], [string $target = ''], [string $onclick = null], [string $class = null])
  • string $url: String containing the value for the hyperlink.
  • string $text: String containing the label for this menu item.
  • string $icon: String containing the filename of the image icon to display for this menu item.
  • string $icon_path: If the icon lives in a non-default directory, where is it?
  • string $target: If the link needs to open in another frame or window, what is its name?
  • string $onclick: Onclick javascript, if desired.
  • string $class: CSS class for the menu item.
addAppLinks (line 259)

Any links to other Horde applications defined in an application's config file by the $conf['menu']['apps'] array are added to the menu array.

void addAppLinks ()
addArray (line 114)

Add an item to the menu array.

  • return: The id (NOT guaranteed to be an array index) of the item just added to the menu.
integer addArray ( $item, string $url, string $text, string $icon, string $icon_path, string $target, string $onclick, string $class)
  • string $url: String containing the value for the hyperlink.
  • string $text: String containing the label for this menu item.
  • string $icon: String containing the filename of the image icon to display for this menu item.
  • string $icon_path: If the icon lives in a non-default directory, where is it?
  • string $target: If the link needs to open in another frame or window, what is its name?
  • string $onclick: Onclick javascript, if desired.
  • string $class: CSS class for the menu item.
  • $item
addSiteLinks (line 279)

Add any other links found in $this->_menufile to be included in the menu.

void addSiteLinks ()
isSelected (line 296)

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

  • return: Whether the given URL is the current location.
boolean isSelected ( $url)
  • $url
render (line 146)

Return the unordered list representing the list of menu items. Styling is done through CSS.

  • return: An unordered list of menu elements that can be entirely styled with CSS.
string render ()
setPosition (line 126)
void setPosition ( $id,  $pos)
  • $id
  • $pos

Documentation generated on Sun, 30 Jan 2011 05:19:35 +0000 by phpDocumentor 1.4.3