MenuConfig
in package
Class MenuConfig.
Describe menu config
Table of Contents
Properties
Methods
- __construct() : mixed
- MenuConfig constructor.
- addItem() : MenuItem
- Add more menu items.
- asButton() : self
- setVariant() : MenuConfig
- toArray() : array<string, mixed>
Properties
$items
protected
Collection<string|int, MenuItem>
$items
$variant
protected
string|null
$variant
= null
Methods
__construct()
MenuConfig constructor.
public
__construct() : mixed
addItem()
Add more menu items.
public
addItem(string $name) : MenuItem
Parameters
- $name : string
Return values
MenuItemasButton()
public
asButton() : self
Return values
selfsetVariant()
public
setVariant(string|null $variant) : MenuConfig
Parameters
- $variant : string|null
Return values
MenuConfigtoArray()
public
toArray() : array<string, mixed>