MetaFox

ItemActionMenu extends MenuConfig
in package

Class ItemActionMenu.

Describe ItemActionMenu

Table of Contents

Properties

$items  : Collection<string|int, MenuItem>
$variant  : string|null

Methods

__construct()  : mixed
MenuConfig constructor.
addItem()  : MenuItem
Add more menu items.
asButton()  : self
setVariant()  : MenuConfig
toArray()  : array<string, mixed>
withDelete()  : MenuItem
Add "deleteItem".
withDeleteForm()  : MenuItem
Add "getDeleteForm".
withEdit()  : MenuItem
Add "editItem".

Properties

Methods

__construct()

MenuConfig constructor.

public __construct() : mixed

asButton()

public asButton() : self
Return values
self

toArray()

public toArray() : array<string, mixed>
Return values
array<string, mixed>

withDelete()

Add "deleteItem".

public withDelete([string|null $label = null ][, array<string|int, mixed>|null $confirmation = null ][, array<string|int, mixed> $showWhen = [] ]) : MenuItem
Parameters
$label : string|null = null
$confirmation : array<string|int, mixed>|null = null
$showWhen : array<string|int, mixed> = []
Return values
MenuItem

withDeleteForm()

Add "getDeleteForm".

public withDeleteForm([string|null $label = null ][, bool $reload = true ][, array<string|int, mixed> $showWhen = [] ]) : MenuItem
Parameters
$label : string|null = null
$reload : bool = true
$showWhen : array<string|int, mixed> = []
Return values
MenuItem

withEdit()

Add "editItem".

public withEdit([string|null $label = null ]) : MenuItem
Parameters
$label : string|null = null
Return values
MenuItem

        
On this page

Search results