Methods to construct and prepare menus for rendering.
More...
Methods to construct and prepare menus for rendering.
Definition at line 13 of file Service.php.
Constructor.
- Parameters
-
Definition at line 31 of file Service.php.
Elgg\Menu\Service::combineMenus |
( |
array |
$names = [] , |
|
|
array |
$params = [] , |
|
|
|
$new_name = '' |
|
) |
| |
Combine several menus into one.
Unprepared menus will be built separately, then combined, with items reassigned to sections named after their origin menu. The returned menu must be prepared before display.
- Parameters
-
| string[] | $names Menu names |
array | $params | Menu params |
string | $new_name | Combined menu name (used for the prepare hook) |
- Returns
- UnpreparedMenu
Definition at line 289 of file Service.php.
Elgg\Menu\Service::getMenu |
( |
|
$name, |
|
|
array |
$params = [] |
|
) |
| |
Build a full menu, pulling items from configuration and the "register" menu hooks.
Parameters are filtered by the "parameters" hook.
- Parameters
-
string | $name | Menu name |
array | $params | Hook/view parameters |
- Returns
- Menu
Definition at line 46 of file Service.php.
Elgg\Menu\Service::getUnpreparedMenu |
( |
|
$name, |
|
|
array |
$params = [] |
|
) |
| |
Build an unprepared menu.
- Parameters
-
string | $name | Menu name |
array | $params | Hook/view parameters |
- Returns
- UnpreparedMenu
Definition at line 58 of file Service.php.
Elgg\Menu\Service::prepareDropdownMenu |
( |
PreparedMenu |
$menu, |
|
|
array |
$params |
|
) |
| |
|
protected |
Prepares a dropdown menu.
- Parameters
-
PreparedMenu | $menu | the current prepared menu |
array | $params | the menu params |
- Returns
Definition at line 211 of file Service.php.
Elgg\Menu\Service::prepareItemContentsView |
( |
PreparedMenu |
$menu, |
|
|
array |
$params |
|
) |
| |
|
protected |
Set a content view for each menu item based on the default for the menu.
- Parameters
-
PreparedMenu | $menu | the current prepared menu |
array | $params | the menu params |
- Returns
- PreparedMenu
- Since
- 4.2
Definition at line 253 of file Service.php.
Split a menu into sections, and pass it through the "prepare" hook.
- Parameters
-
- Returns
- Menu
Definition at line 104 of file Service.php.
Elgg\Menu\Service::prepareMenuItems |
( |
|
$items = [] | ) |
|
Elgg\Menu\Service::prepareSelectedParents |
( |
PreparedMenu |
$menu, |
|
|
array |
$params |
|
) |
| |
|
protected |
Marks parents of selected items also as selected.
- Parameters
-
PreparedMenu | $menu | the current prepared menu |
array | $params | the menu params |
- Returns
Definition at line 187 of file Service.php.
Elgg\Menu\Service::prepareVerticalMenu |
( |
PreparedMenu |
$menu, |
|
|
array |
$params |
|
) |
| |
|
protected |
Prepares a vertical menu by setting the display child menu option to "toggle" if not set.
- Parameters
-
PreparedMenu | $menu | the current prepared menu |
array | $params | the menu params |
- Returns
Definition at line 151 of file Service.php.
The documentation for this class was generated from the following file: