| Methods |
public
|
registerTypeExecutor(string $type, array $seed): void
Register an executor for a basic type.
Register an executor for a basic type.
|
#
|
public
|
registerExecutor(UserAction $action, array $seed): void
Register an executor instance for a specific model User action.
Register an executor instance for a specific model User action.
|
#
|
public
|
registerTrigger(string $type, array|View $seed, UserAction $action, bool $isSpecific = false): void
Register a trigger for a specific View type.
Trigger can be specify per action or per model/action.
Register a trigger for a specific View type.
Trigger can be specify per action or per model/action.
|
#
|
public
|
useTriggerDefault(string $type): void
Set an action trigger type to use it's default seed.
Set an action trigger type to use it's default seed.
|
#
|
public
|
registerCaption(UserAction $action, string $caption, bool $isSpecific = false, string $type = null): void
Register a trigger caption.
Register a trigger caption.
|
#
|
public
|
createTrigger(
UserAction $action,
string $type = null,
): ($type is self::MENU_ITEM ? MenuItem : ($type is self::TABLE_MENU_ITEM ? MenuItem : Button))
|
#
|
public
|
getCaption(UserAction $action, string $type = null): string
|
#
|
public
|
createExecutor(UserAction $action, View $owner, string $requiredType = null): AbstractView&ExecutorInterface
|
#
|
protected
|
createActionTrigger(UserAction $action, string $type = null): View
Create executor View for firing model user action.
Create executor View for firing model user action.
|
#
|
protected
|
getDefaultTrigger(UserAction $action, string $type = null): array
Return executor default trigger seed based on type.
Return executor default trigger seed based on type.
|
#
|
protected
|
getActionCaption(UserAction $action, string $type = null): string
Return action caption set in actionLabel or default.
Return action caption set in actionLabel or default.
|
#
|
protected
|
getAddMenuItem(UserAction $action): array
Return Add action seed for menu item.
Return Add action seed for menu item.
|
#
|
protected
|
getAddActionCaption(UserAction $action): string
Return label for add model UserAction.
Return label for add model UserAction.
|
#
|
protected
|
getModelKey(UserAction $action): string
|
#
|
| Properties |
public
|
string
|
$buttonPrimaryColor = 'primary'
|
#
|
protected
|
array<string, array>
|
$executorSeed = [
self::JS_EXECUTOR => [JsCallbackExecutor::class],
self::STEP_EXECUTOR => [ModalExecutor::class],
self::CONFIRMATION_EXECUTOR => [ConfirmationExecutor::class],
]
|
#
|
protected
|
array<string, string|array<string, string>>
|
$triggerCaption = [self::MODAL_BUTTON => ['add' => 'Save', 'edit' => 'Save']]
|
#
|
protected
|
array<string, array|View>
|
$triggerSeed = [
self::TABLE_BUTTON => [
'edit' => [Button::class, null, 'icon' => 'edit'],
'delete' => [Button::class, null, 'icon' => 'red trash'],
],
self::MENU_ITEM => ['add' => [__CLASS__, 'getAddMenuItem']],
]
|
#
|