Your cart is empty!
Setup Sidebar Menu
public function onSetupEmployeesAreaSidebarMenu(array &$menu) : void
Fires before displaying the sidebar menu in the Employees Area.
Description
Trigger hook to allow the plugins to alter the items of the sidebar menu displayed within the Employees Area.
Here it is possible to attach new items or detach/edit existing ones.
The items of the menu are associative arrays, which should specify the following attributes:
Name | Type | Description |
separator |
boolean | Whether to add a separator after this menu item. |
title |
string | The title to display within the button. |
icon |
string | The icon to display before the button title. |
query |
array | An array of query attributes to be added within the URL. |
The new items to push within the array must be registered with a unique key.
Parameters
- &$menu
-
(array) The sidebar menu array.
Example
None.
Example
The example below detaches the "Coupons" item from the sidebar menu.
/**
* Trigger hook to allow the plugins to alter the items of the sidebar menu
* displayed within the Employees Area.
*
* @param array &$menu The sidebar menu.
*
* @return void
*/
public function onSetupEmployeesAreaSidebarMenu(&$menu)
{
unset($menu['coupons']);
}
Changelog
Version | Description |
---|---|
1.7 | Introduced. |
Last Update: 2021-10-08 09:20
Helpful?