Moderation Transition Create
moderation_transition_createAdd a moderation transition to a Drupal workflow by defining origin states, target state, and label, so content can move between existing workflow states.
Instructions
Create a new moderation transition on a workflow.
Transitions are configuration inside the workflow entity, so they
cannot be POSTed as a JSON:API resource. This adds one the way
Drupal's own transition form does: through
WorkflowTypeInterface::addTransition() and a save of the workflow,
which writes the change back into the workflow's configuration.
Both the origin states and the target state must already exist in the
workflow; an error names the ones that do not and lists the states the
workflow does have. weight defaults to 0, which places the transition
first -- pass a higher number to append it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | ||
| weight | No | ||
| to_state | Yes | ||
| from_states | Yes | ||
| workflow_id | Yes | ||
| transition_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||