PHP 클래스 Horde_Menu, horde

Copyright 1999-2016 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.
저자: Chuck Hagenbuch ([email protected])
저자: Jon Parise ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_menu array Menu array.

공개 메소드들

메소드 설명
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.
addArray ( array $item ) : integer Add an item to the menu array.
addSiteLinks ( ) Add links found in the application's menu configuration.
getSiteLinks ( ) : array Get the list of site links to add to the menu.
isSelected ( $url ) : boolean Checks to see if the current url matches the given url.
render ( ) : Horde_View_Sidebar Return the rendered representation of the menu items.

보호된 메소드들

메소드 설명
_render ( ) : Horde_View_Sidebar Converts the menu to a sidebar view.

메소드 상세

_render() 보호된 메소드

Converts the menu to a sidebar view.
protected _render ( ) : Horde_View_Sidebar
리턴 Horde_View_Sidebar Sidebar view of menu elements.

add() 공개 메소드

Add an item to the menu array.
public add ( string $url, string $text, string $icon = '', string $icon_path = null, string $target = '', string $onclick = null, string $class = null )
$url string String containing the value for the hyperlink.
$text string String containing the label for this menu item.
$icon string String containing the filename of the image icon to display for this menu item.
$icon_path string If the icon lives in a non-default directory, where is it?
$target string If the link needs to open in another frame or window, what is its name?
$onclick string Onclick javascript, if desired.
$class string CSS class for the menu item.

addArray() 공개 메소드

Add an item to the menu array.
public addArray ( array $item ) : integer
$item array The item to add. Valid keys:
'class' - (string) CSS classname.
'icon' - (string) Filename of the image icon.
'icon_path' - (string) Non-default directory path for icon.
'onclick' - (string) Onclick javascript.
'target' - (string) HREF target parameter.
'text' - (string) Label.
'url' - (string) Hyperlink.
리턴 integer The id (NOT guaranteed to be an array index) of the item just added to the menu.

isSelected() 공개 정적인 메소드

Checks to see if the current url matches the given url.
public static isSelected ( $url ) : boolean
리턴 boolean Whether the given URL is the current location.

render() 공개 메소드

Return the rendered representation of the menu items.
public render ( ) : Horde_View_Sidebar
리턴 Horde_View_Sidebar Sidebar view of menu elements.

프로퍼티 상세

$_menu 보호되어 있는 프로퍼티

Menu array.
protected array $_menu
리턴 array