abstract class Actionables (View source)

The list of models that can have actions applied to them.

When Waterhole renders an action form, the ID of the model being actioned is sent. But it also needs to convey what kind of model it is, so it can be retrieved from the database prior to running the action. This extender keeps track of the kinds of models that are allowed to be looked up by ID and have actions applied to them.

Traits

Methods

static void
add($content = null, string|null $key = null)

Add an item to the list.

static void
remove(string $key)

Remove an item from the list.

static 
get(string $key)

Get an item in the list.

static array
keys()

Get the keys that have been registered.

static array
build()

Get the resulting list.

static string|null
getActionableName($model)

Get the actionable name of the given model.

Details

static void add($content = null, string|null $key = null)

Add an item to the list.

Parameters

$content
string|null $key

Return Value

void

static void remove(string $key)

Remove an item from the list.

Parameters

string $key

Return Value

void

static get(string $key)

Get an item in the list.

Parameters

string $key

static array keys()

Get the keys that have been registered.

Return Value

array

static array build()

Get the resulting list.

Return Value

array

static string|null getActionableName($model)

Get the actionable name of the given model.

Parameters

$model

Return Value

string|null