\Charcoal\Ui\MenuMenuInterface

Defines a menu.

Summary

Methods
Constants
setItems()
addItem()
items()
hasItems()
numItems()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

setItems()

setItems(array  $items) : \Charcoal\Ui\Menu\MenuInterface

Parameters

array $items

The menu items.

Returns

\Charcoal\Ui\Menu\MenuInterface

Chainable

addItem()

addItem(array|\Charcoal\Ui\Menu\MenuItemInterface  $item) : \Charcoal\Ui\Menu\MenuInterface

Parameters

array|\Charcoal\Ui\Menu\MenuItemInterface $item

A menu item structure or object.

Returns

\Charcoal\Ui\Menu\MenuInterface

Chainable

items()

items() : array<mixed,\Charcoal\Ui\Menu\MenuItemInterface>

Returns

array<mixed,\Charcoal\Ui\Menu\MenuItemInterface>

hasItems()

hasItems() : boolean

Returns

boolean

numItems()

numItems() : integer

Returns

integer