function WorkflowTypeInterface::addTransition
Same name in other branches
- 9 core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::addTransition()
- 10 core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::addTransition()
- 11.x core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::addTransition()
Adds a transition to the workflow.
Parameters
string $id: The transition ID.
string $label: The transition's label.
array $from_state_ids: The state IDs to transition from.
string $to_state_id: The state ID to transition to.
Return value
$this
Throws
\InvalidArgumentException Thrown if either state does not exist.
1 method overrides WorkflowTypeInterface::addTransition()
- WorkflowTypeBase::addTransition in core/
modules/ workflows/ src/ Plugin/ WorkflowTypeBase.php - Adds a transition to the workflow.
File
-
core/
modules/ workflows/ src/ WorkflowTypeInterface.php, line 205
Class
- WorkflowTypeInterface
- An interface for Workflow type plugins.
Namespace
Drupal\workflowsCode
public function addTransition($id, $label, array $from_state_ids, $to_state_id);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.