MenuItem
class MenuItem
Menu item definition A translation of the menu item configuration
Properties
string | $itemName | ||
string | $idPrefix | ||
string | $label | ||
string | $anchor | ||
string | $type | ||
string | $options | ||
string | $context | ||
bool | $disabled | ||
array | $icon | ||
array | $badge | ||
$badgeCount | |||
array | $viewMoreUrl | ||
array | $optionsView | ||
string | $path | ||
string | $partial | ||
array | $attributes | ||
string | $cssClass | ||
array | $config |
Methods
__construct($itemName, $label)
No description
$this
displayAs(string $type, array $config = [])
Specifies a item control rendering mode. Supported modes are:
- group - menu by a group of IDs. Default.
array
evalConfig(array $config)
Process options and apply them to this object.
array|string
getAttributes(bool $htmlBuild = TRUE)
Returns the attributes for this item.
string
getId(null $suffix = null)
Returns a value suitable for the item id property.
unreadCount($value = null)
No description
Details
at line 100
__construct($itemName, $label)
No description
at line 111
MenuItem|array
options($value = null)
Sets item options, for dropdowns.
at line 141
$this
displayAs(string $type, array $config = [])
Specifies a item control rendering mode. Supported modes are:
- group - menu by a group of IDs. Default.
- checkbox - menu by a simple toggle switch.
at line 156
protected array
evalConfig(array $config)
Process options and apply them to this object.
at line 208
array|string
getAttributes(bool $htmlBuild = TRUE)
Returns the attributes for this item.
*
at line 231
string
getId(null $suffix = null)
Returns a value suitable for the item id property.
at line 247
unreadCount($value = null)
No description