Workflow event elements — part 2
Generated from brezel/api@ddd04f543e0fecc433a351dcaab24d39087b24be — do not edit by hand.
event/on_change
Section titled “event/on_change”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).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
title | text | null | not declared | Title |
module | module | null | not declared | Module |
async | bool | false | not declared | Async |
refresh_prototype | bool | true | not declared | If true, the prototype’s relations will be refreshed before the event is executed. |
event/on_click
Section titled “event/on_click”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).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
event/on_create_tab_loaded
Section titled “event/on_create_tab_loaded”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"}).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
title | text | null | not declared | Title |
module | module | null | not declared | Module |
async | bool | false | not declared | Async |
event/on_item_add
Section titled “event/on_item_add”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).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
title | text | null | not declared | Title |
module | module | null | not declared | Module |
async | bool | false | not declared | Async |
event/on_item_delete
Section titled “event/on_item_delete”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).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
title | text | null | not declared | Title |
module | module | null | not declared | Module |
async | bool | false | not declared | Async |
event/on_load
Section titled “event/on_load”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).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
title | text | null | not declared | Title |
module | module | null | not declared | Module |
async | bool | false | not declared | Async |
event/on_show
Section titled “event/on_show”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).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
title | text | null | not declared | Title |
module | module | null | not declared | Module |
async | bool | false | not declared | Async |
event/on_sync
Section titled “event/on_sync”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).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
title | text | null | not declared | Title |
module | module | null | not declared | Module |
async | bool | false | not declared | Async |
event/options
Section titled “event/options”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).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
title | text | null | not declared | Title |
module | module | null | not declared | Module |
async | bool | false | not declared | Async |
event/policy
Section titled “event/policy”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).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
roles | text | null | not declared | When not empty, this policy will only apply if users have at least one of these roles. |
allow | text | null | not declared | When not empty, this policy will not apply if users have at least one of these roles. |
roleKey | select | name | not declared | Id roles by Values: slug, name. |
operations | select | null | not declared | Operations Values: create, read, update, delete. |
event/policyDelete
Section titled “event/policyDelete”Runs when someone tries to delete an Entity of a given module
Input ports: none.
Output ports: default (query; Query), entity (resource; Entity).
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
module | module | null | not declared | Module |
roles | text | null | not declared | When not empty, this policy will only apply if users have at least one of these roles. |
allow | text | null | not declared | When not empty, this policy will not apply if users have at least one of these roles. |
roleKey | select | name | not declared | Id roles by Values: slug, name. |