Свойство | Type | Description | |
---|---|---|---|
$edits | |||
$menu | |||
$menuEntries | |||
$menuEntriesToRemove | |||
$menuIcons | |||
$menus | |||
$orderingApplied | |||
$renames |
Méthode | Description | |
---|---|---|
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. |
Méthode | Description | |
---|---|---|
getAllMenus ( ) : |
Returns a list of available plugin menu instances. | |
menuCompare ( array $itemOne, array $itemTwo ) : boolean | Compares two menu entries. Used for ordering. |
Méthode | Description | |
---|---|---|
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 |
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. |
public editUrl ( $mainMenuToEdit, $subMenuToEdit, $newUrl ) | ||
$mainMenuToEdit | ||
$subMenuToEdit | ||
$newUrl |
protected getAllMenus ( ) : |
||
Résultat |
public getMenu ( ) : Array | ||
Résultat | Array |
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' |
public rename ( $mainMenuOriginal, $subMenuOriginal, $mainMenuRenamed, $subMenuRenamed ) | ||
$mainMenuOriginal | ||
$subMenuOriginal | ||
$mainMenuRenamed | ||
$subMenuRenamed |