Skip to content

Workflow event elements — part 2

Generated from brezel/api@ddd04f543e0fecc433a351dcaab24d39087b24be — do not edit by hand.

Runs when a field whose options.events.on_change names this event changes in the form. The SPA sends prototype, value, previousValue and selector; answer with action/set to change form values. Nothing is saved until the user saves.

Input ports: none.

Output ports: default (flow; default; runnable; recipe type {"kind":"entity","moduleFromOption":"module"}), prototype (resource; prototype), original (resource; original), selector (string; selector), absolute_selector (string; absolute_selector), value (any; value), previousValue (any; previousValue), dataForDiff (any; dataForDiff).

OptionTypeDefaultRequiredDescription
titletextnullnot declaredTitle
modulemodulenullnot declaredModule
asyncboolfalsenot declaredAsync
refresh_prototypebooltruenot declaredIf true, the prototype’s relations will be refreshed before the event is executed.

Runs when a button in a layout is clicked.

Input ports: none.

Output ports: default (resource; Draft; runnable), original (resource; original), context (resource; context), selected (any; selected), selector (string; selector), absolute_selector (string; absolute_selector).

OptionTypeDefaultRequiredDescription
modulemodulenullnot declaredModule

Fires once a tab is loaded in a create context in the frontend.

Input ports: none.

Output ports: default (flow; default; runnable; recipe type {"kind":"entity","moduleFromOption":"module"}).

OptionTypeDefaultRequiredDescription
titletextnullnot declaredTitle
modulemodulenullnot declaredModule
asyncboolfalsenot declaredAsync

Fires once a list item is added in the frontend.

Input ports: none.

Output ports: default (flow; default; runnable; recipe type {"kind":"entity","moduleFromOption":"module"}), prototype (resource; prototype), original (resource; original), selector (string; selector), value (string; value).

OptionTypeDefaultRequiredDescription
titletextnullnot declaredTitle
modulemodulenullnot declaredModule
asyncboolfalsenot declaredAsync

Fires once a list item is removed in the frontend.

Input ports: none.

Output ports: default (flow; default; runnable; recipe type {"kind":"entity","moduleFromOption":"module"}), prototype (resource; prototype), original (resource; original), selector (string; selector), value (string; value).

OptionTypeDefaultRequiredDescription
titletextnullnot declaredTitle
modulemodulenullnot declaredModule
asyncboolfalsenot declaredAsync

Runs once a field is mounted in edit or create mode.

Input ports: none.

Output ports: default (flow; default; runnable; recipe type {"kind":"entity","moduleFromOption":"module"}), original (resource; original), selector (string; selector).

OptionTypeDefaultRequiredDescription
titletextnullnot declaredTitle
modulemodulenullnot declaredModule
asyncboolfalsenot declaredAsync

Runs once a field is mounted in show mode.

Input ports: none.

Output ports: default (flow; default; runnable; recipe type {"kind":"entity","moduleFromOption":"module"}), selector (string; selector).

OptionTypeDefaultRequiredDescription
titletextnullnot declaredTitle
modulemodulenullnot declaredModule
asyncboolfalsenot declaredAsync

Runs when 1) field in frontend is initialized 2) field in frontend is edited

Input ports: none.

Output ports: default (flow; default; runnable; recipe type {"kind":"entity","moduleFromOption":"module"}), prototype (resource; prototype), original (resource; original), selector (string; selector).

OptionTypeDefaultRequiredDescription
titletextnullnot declaredTitle
modulemodulenullnot declaredModule
asyncboolfalsenot declaredAsync

App\Workflow\Elements\Event\WorkflowEventOptions Runs when a choice or select field fetches its options (and is defined to use a workflow as the source). The triggered workflow should return the options for a select or choice field as an array.

Input ports: none.

Output ports: default (flow; default; runnable; recipe type {"kind":"entity","moduleFromOption":"module"}), original (resource; original), selector (string; selector), search (string; search).

OptionTypeDefaultRequiredDescription
titletextnullnot declaredTitle
modulemodulenullnot declaredModule
asyncboolfalsenot declaredAsync

Can be used to create a policy that applies to a workflow query or an entity. You can basically use these as an programmable and dynamic permission system.

Input ports: none.

Output ports: default (query; Query), entity (resource; Entity).

OptionTypeDefaultRequiredDescription
modulemodulenullnot declaredModule
rolestextnullnot declaredWhen not empty, this policy will only apply if users have at least one of these roles.
allowtextnullnot declaredWhen not empty, this policy will not apply if users have at least one of these roles.
roleKeyselectnamenot declaredId roles by Values: slug, name.
operationsselectnullnot declaredOperations Values: create, read, update, delete.

Runs when someone tries to delete an Entity of a given module

Input ports: none.

Output ports: default (query; Query), entity (resource; Entity).

OptionTypeDefaultRequiredDescription
modulemodulenullnot declaredModule
rolestextnullnot declaredWhen not empty, this policy will only apply if users have at least one of these roles.
allowtextnullnot declaredWhen not empty, this policy will not apply if users have at least one of these roles.
roleKeyselectnamenot declaredId roles by Values: slug, name.