PHP 클래스 Piwik\Menu\MenuAbstract

There are three menus in Piwik, the main menu, the top menu and the admin menu. Each menu has a class that manages the menu's content. Each class invokes a different event to allow plugins to add new menu items.
상속: extends Piwik\Singleton
파일 보기 프로젝트 열기: piwik/piwik 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$edits
$menu
$menuEntries
$menuEntriesToRemove
$menuIcons
$menus
$orderingApplied
$renames

공개 메소드들

메소드 설명
addItem ( string $menuName, string $subMenuName, string | array $url, integer $order = 50, boolean | string $tooltip = false ) Adds a new entry to the menu.
clearMenus ( ) To use only for tests.
editUrl ( $mainMenuToEdit, $subMenuToEdit, $newUrl ) Edits a URL of an existing menu entry.
getMenu ( ) : Array Builds the menu, applies edits, renames and orders the entries.
registerMenuIcon ( string $menuName, string $iconCssClass ) lets you register a menu icon for a certain menu category to replace the default arrow icon.
remove ( string $menuName, boolean | string $subMenuName = false ) Removes an existing entry from the menu.
rename ( $mainMenuOriginal, $subMenuOriginal, $mainMenuRenamed, $subMenuRenamed ) Renames a single menu entry.

보호된 메소드들

메소드 설명
getAllMenus ( ) : Menu[] Returns a list of available plugin menu instances.
menuCompare ( array $itemOne, array $itemTwo ) : boolean Compares two menu entries. Used for ordering.

비공개 메소드들

메소드 설명
applyEdits ( ) Applies all edits to the menu.
applyOrdering ( ) Orders the menu according to their order.
applyRemoves ( )
applyRenames ( ) Applies renames to the menu.
buildMenu ( ) Builds the menu from the $this->menuEntries variable.
buildMenuItem ( string $menuName, string $subMenuName, string $url, integer $order = 50, boolean | string $tooltip = false ) Builds a single menu item

메소드 상세

addItem() 공개 메소드

Adds a new entry to the menu.
부터: 2.7.0
public addItem ( string $menuName, string $subMenuName, string | array $url, integer $order = 50, boolean | string $tooltip = false )
$menuName string The menu's category name. Can be a translation token.
$subMenuName string The menu item's name. Can be a translation token.
$url string | array The URL the admin menu entry should link to, or an array of query parameters that can be used to build the URL.
$order integer The order hint.
$tooltip boolean | string An optional tooltip to display or false to display the tooltip.

clearMenus() 공개 정적인 메소드

To use only for tests.
사용 중단: The whole $menus cache should be replaced by a real transient cache
public static clearMenus ( )

editUrl() 공개 메소드

Edits a URL of an existing menu entry.
public editUrl ( $mainMenuToEdit, $subMenuToEdit, $newUrl )
$mainMenuToEdit
$subMenuToEdit
$newUrl

getAllMenus() 보호된 메소드

Returns a list of available plugin menu instances.
protected getAllMenus ( ) : Menu[]
리턴 Piwik\Plugin\Menu[]

getMenu() 공개 메소드

Builds the menu, applies edits, renames and orders the entries.
public getMenu ( ) : Array
리턴 Array

menuCompare() 보호된 메소드

Compares two menu entries. Used for ordering.
protected menuCompare ( array $itemOne, array $itemTwo ) : boolean
$itemOne array
$itemTwo array
리턴 boolean

registerMenuIcon() 공개 메소드

lets you register a menu icon for a certain menu category to replace the default arrow icon.
public registerMenuIcon ( string $menuName, string $iconCssClass )
$menuName string The translation key of a main menu category, eg 'Dashboard_Dashboard'
$iconCssClass string The css class name of an icon, eg 'icon-user'

remove() 공개 메소드

Removes an existing entry from the menu.
public remove ( string $menuName, boolean | string $subMenuName = false )
$menuName string The menu's category name. Can be a translation token.
$subMenuName boolean | string The menu item's name. Can be a translation token.

rename() 공개 메소드

Renames a single menu entry.
public rename ( $mainMenuOriginal, $subMenuOriginal, $mainMenuRenamed, $subMenuRenamed )
$mainMenuOriginal
$subMenuOriginal
$mainMenuRenamed
$subMenuRenamed

프로퍼티 상세

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

protected $edits

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

protected $menu

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

protected $menuEntries

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

protected $menuEntriesToRemove

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

protected $menuIcons

$menus 보호되어 있는 정적으로 프로퍼티

protected static $menus

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

protected $orderingApplied

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

protected $renames