Actions
abstract class Actions (View source)
The list of Actions.
Actions are a mechanism for performing tasks on one or more models – for example, deleting comments, or locking a post. Each item's context menu is really just this list of Actions, filtered so that only the relevant ones are displayed.
Use this extender to register a Waterhole\Actions\Action
class. Plain
components such as MenuDivider
s can also be added.
Traits
Methods
static void
add($content = null, int $position = 0, string|null $key = null)
Add an item to the list.
from
OrderedList
Details
static void
add($content = null, int $position = 0, string|null $key = null)
Add an item to the list.
static void
replace(string $key, $content)
Replace an existing item in the list.
static void
remove(string $key)
Remove an item from the list.
static array|null
get(string $key)
Get an item in the list.
static array
build()
Get the resulting list in order.
static array
for($models, User $user = null)
Get a list of action instances that can be applied to the given model(s).