Interface LaravelUi5\Core\Ui5\Capabilities\ActionHandlerInterface

Marker for a UI5 action handler — the state-changing behaviour behind an Action (updating/deleting records, triggering workflows, domain commands). Always returns a structured array describing the outcome, e.g. ['status' => 'success', 'message' => 'Mailbox cleared'] — even when no payload is strictly required.

Why a marker, not a typed method. The handle() method's parameters are resolved by the container at invoke time, which a PHP interface cannot express — the same reason Laravel's own ShouldQueue is a marker and never types handle(). So the contract is documented + runtime-enforced:

  • handle(): array — perform the operation; return a JSON-serializable result. Unlike a {@see DataProviderInterface}, an action may mutate state.
  • {@see \LaravelUi5\Core\Runtime\ExecutableInvoker} calls handle() and throws {@see \LaravelUi5\Core\Exceptions\MissingExecutableMethodException} if it is absent.

Injection recipe (good style — the same on every invoked-behaviour capability):

  • Services, repositories, gateways → the constructor. The Action returns the handler via app(YourHandler::class) from getHandler(), so the container autowires them — and constructor DI sidesteps the invoker's has()-only method-parameter resolution.
  • Per-request inputs → handle()'s method parameters — a FormRequest, route-resolved models, and {@see Parameter}-declared values. They exist only at invocation, exactly like Laravel route-model binding lands on a controller method.
Methods