| Methods |
public
|
addUserAction<T is Model>(
string $name,
array<mixed>|(Closure(T, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed): mixed) $seed = [],
): UserAction
Register new user action for this model. By default UI will allow users to trigger actions
from UI.
Register new user action for this model. By default UI will allow users to trigger actions
from UI.
|
#
|
public
|
hasUserAction(string $name): bool
Returns true if user action with a corresponding name exists.
Returns true if user action with a corresponding name exists.
|
#
|
private
|
addUserActionFromModel(string $name, UserAction $action): void
|
#
|
public
|
getUserActions(string $appliesTo = null): array<string, UserAction>
Returns list of actions for this model. Can filter actions by records they apply to.
It will also skip system user…
Returns list of actions for this model. Can filter actions by records they apply to.
It will also skip system user actions (where system === true).
Parameters
| $appliesTo |
e.g. UserAction::APPLIES_TO_ALL_RECORDS
|
|
#
|
public
|
getUserAction(string $name): UserAction
Returns one action object of this model. If action not defined, then throws exception.
Returns one action object of this model. If action not defined, then throws exception.
|
#
|
public
|
removeUserAction(string $name): $this
Remove specified action.
|
#
|
public
|
executeUserAction(string $name, mixed ...$args): mixed
Execute specified action with specified arguments.
Execute specified action with specified arguments.
|
#
|
protected
|
initUserActions(): void
|
#
|