WorkflowActionTrait
Shared helpers for workflow action providers.
Table of Contents
Methods
- coerceDateTime() : DateTime|null
- Normalize date-like action input values.
- guard() : array{success: bool, data: array, error: string|null}
- Run action code and return a standard ActionResult envelope.
Methods
coerceDateTime()
Normalize date-like action input values.
protected
coerceDateTime(mixed $value[, string|null $default = null ]) : DateTime|null
Parameters
- $value : mixed
-
DateTime, string, or null
- $default : string|null = null
-
Default date/time expression for null input
Return values
DateTime|nullguard()
Run action code and return a standard ActionResult envelope.
protected
guard(string $name, callable $fn) : array{success: bool, data: array, error: string|null}
Parameters
- $name : string
-
Action name for logging
- $fn : callable
-
Action implementation