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

MenuItem|array
options($value = null)

Sets item options, for dropdowns.

$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

Parameters

$itemName
$label

at line 111
MenuItem|array options($value = null)

Sets item options, for dropdowns.

Parameters

$value

Return Value

MenuItem|array

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.

Parameters

string $type

Specifies a render mode as described above

array $config

A list of render mode specific config.

Return Value

$this

at line 156
protected array evalConfig(array $config)

Process options and apply them to this object.

Parameters

array $config

Return Value

array

at line 208
array|string getAttributes(bool $htmlBuild = TRUE)

Returns the attributes for this item.

*

Parameters

bool $htmlBuild

Return Value

array|string

at line 231
string getId(null $suffix = null)

Returns a value suitable for the item id property.

Parameters

null $suffix

Return Value

string

at line 247
unreadCount($value = null)

No description

Parameters

$value