MenuExtension
extends BaseExtension
in package
Provides extensions to the Plates engine, adding helper methods for menus
Tags
Table of Contents
- getActiveMenuItem() : MenuItem|null
- Gets the active menu item
- isActiveMenuItem() : bool
- Checks if the given menu item is active
- isChildActiveMenuItem() : bool
- Checks if the given menu item is active or a child is active
- register() : void
- Registers the helper method with the plates engine
Methods
getActiveMenuItem()
Gets the active menu item
public
getActiveMenuItem() : MenuItem|null
Tags
Return values
MenuItem|null —isActiveMenuItem()
Checks if the given menu item is active
public
isActiveMenuItem(MenuItem $menuItem) : bool
Parameters
- $menuItem : MenuItem
Tags
Return values
bool —isChildActiveMenuItem()
Checks if the given menu item is active or a child is active
public
isChildActiveMenuItem(MenuItem $menuItem) : bool
Parameters
- $menuItem : MenuItem
Tags
Return values
bool —register()
Registers the helper method with the plates engine
public
register(Engine $engine) : void
Parameters
- $engine : Engine