MenuItem
in package
Uses
TraitAttributeBag
Class MenuItemConfig.
Table of Contents
Properties
- $attributes : array<string, mixed|null>
Methods
- __call() : MenuItem
- __construct() : mixed
- MenuItemConfig constructor.
- action() : $this
- Set params.action attribute.
- alert() : static
- asAddRow() : $this
- Set value to ACTION_ROW_ADD.
- asBatchActive() : $this
- Set value to ACTION_BATCH_ACTIVE.
- asBatchEdit() : $this
- Set value to batch edit.
- asBatchInactive() : $this
- Set value to ACTION_BATCH_INACTIVE.
- asDeleteRow() : $this
- Set value to ACTION_ROW_DELETE.
- asDownload() : static
- asEditRow() : $this
- Set value to ACTION_ROW_EDIT.
- config() : $this
- This method is deprecated. Prefer `setAttributes` to be safe.
- confirm() : static
- disabled() : $this
- Set disabled attribute.
- enableWhen() : $this
- Set value of "enabledWhen" attribute.
- getAttribute() : mixed|null
- icon() : $this
- Set icon attribute.
- label() : $this
- params() : $this
- Set params array.
- reload() : static
- removeAttribute() : $this
- Remove an attribute by specific name.
- setAttribute() : $this
- Set attribute name/value pair.
- setAttributes() : self
- showWhen() : $this
- Add show when rule array.
- style() : $this
- toArray() : array<string, mixed>
- value() : $this
- Set attribute value.
Properties
$attributes
protected
array<string, mixed|null>
$attributes
= []
Methods
__call()
public
__call(mixed $method, mixed $args) : MenuItem
Parameters
- $method : mixed
- $args : mixed
Return values
MenuItem__construct()
MenuItemConfig constructor.
public
__construct(string $name) : mixed
Parameters
- $name : string
action()
Set params.action attribute.
public
action(string $action) : $this
Parameters
- $action : string
Return values
$thisalert()
public
alert(mixed $alert) : static
Parameters
- $alert : mixed
Return values
staticasAddRow()
Set value to ACTION_ROW_ADD.
public
asAddRow() : $this
Tags
Return values
$thisasBatchActive()
Set value to ACTION_BATCH_ACTIVE.
public
asBatchActive() : $this
Tags
Return values
$thisasBatchEdit()
Set value to batch edit.
public
asBatchEdit() : $this
Tags
Return values
$thisasBatchInactive()
Set value to ACTION_BATCH_INACTIVE.
public
asBatchInactive() : $this
Tags
Return values
$thisasDeleteRow()
Set value to ACTION_ROW_DELETE.
public
asDeleteRow() : $this
Tags
Return values
$thisasDownload()
public
asDownload() : static
Return values
staticasEditRow()
Set value to ACTION_ROW_EDIT.
public
asEditRow() : $this
Tags
Return values
$thisconfig()
This method is deprecated. Prefer `setAttributes` to be safe.
public
config(array<string, mixed> $options) : $this
Parameters
- $options : array<string, mixed>
Tags
Return values
$thisconfirm()
public
confirm(mixed $confirm) : static
Parameters
- $confirm : mixed
Return values
staticdisabled()
Set disabled attribute.
public
disabled(bool $disabled) : $this
Parameters
- $disabled : bool
Return values
$thisenableWhen()
Set value of "enabledWhen" attribute.
public
enableWhen(array<string|int, mixed> $params) : $this
Parameters
- $params : array<string|int, mixed>
Return values
$thisgetAttribute()
public
getAttribute(string $name[, mixed $value = null ]) : mixed|null
Parameters
- $name : string
- $value : mixed = null
Return values
mixed|nullicon()
Set icon attribute.
public
icon(string $iconName) : $this
Parameters
- $iconName : string
Return values
$thislabel()
public
label(string $label) : $this
Parameters
- $label : string
Return values
$thisparams()
Set params array.
public
params(array<string, mixed> $params) : $this
Parameters
- $params : array<string, mixed>
Return values
$thisreload()
public
reload([mixed $value = true ]) : static
Parameters
- $value : mixed = true
Return values
staticremoveAttribute()
Remove an attribute by specific name.
public
removeAttribute(string $name) : $this
Parameters
- $name : string
Return values
$thissetAttribute()
Set attribute name/value pair.
public
setAttribute(string $name, mixed|null $value) : $this
Parameters
- $name : string
- $value : mixed|null
Return values
$thissetAttributes()
public
setAttributes(array<string|int, mixed> $attributes) : self
Parameters
- $attributes : array<string|int, mixed>
Return values
selfshowWhen()
Add show when rule array.
public
showWhen(array<string|int, mixed> $params) : $this
Parameters
- $params : array<string|int, mixed>
Return values
$thisstyle()
public
style(string $style) : $this
Parameters
- $style : string
Return values
$thistoArray()
public
toArray() : array<string, mixed>
Return values
array<string, mixed>value()
Set attribute value.
public
value(string $value) : $this
Parameters
- $value : string