Class dmstr\widgets\Menu
Inheritance | dmstr\widgets\Menu » yii\widgets\Menu |
---|
Class Menu Theme menu widget.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$activateParents | dmstr\widgets\Menu | ||
$linkTemplate | dmstr\widgets\Menu | ||
$submenuTemplate | dmstr\widgets\Menu |
Protected Methods
Method | Description | Defined By |
---|---|---|
isItemActive() | Checks whether a menu item is active. | dmstr\widgets\Menu |
normalizeItems() | dmstr\widgets\Menu | |
renderItem() | dmstr\widgets\Menu | |
renderItems() | Recursively renders the menu items (without the container tag). | dmstr\widgets\Menu |
Property Details
Method Details
Checks whether a menu item is active.
This is done by checking if \dmstr\widgets\route and \dmstr\widgets\params match that specified in the url
option of the menu item.
When the url
option of a menu item is specified in terms of an array, its first element is treated
as the route for the item and the rest of the elements are the associated parameters.
Only when its route and parameters match \dmstr\widgets\route and \dmstr\widgets\params, respectively, will a menu item
be considered active.
protected boolean isItemActive ( $item ) | ||
$item | array | The menu item to be checked |
return | boolean | Whether the menu item is active |
---|
protected void normalizeItems ( $items, <b>&</b>$active ) | ||
$items | ||
$active |
protected void renderItem ( $item ) | ||
$item |
Recursively renders the menu items (without the container tag).
protected string renderItems ( $items ) | ||
$items | array | The menu items to be rendered recursively |
return | string | The rendering result |
---|