function WorkflowTypeInterface::getTransitionsForState

Same name in other branches
  1. 9 core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::getTransitionsForState()
  2. 8.9.x core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::getTransitionsForState()
  3. 10 core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::getTransitionsForState()

Gets the transitions for a state for the provided direction.

Parameters

$state_id: The state to get transitions for.

string $direction: (optional) The direction of the transition, defaults to TransitionInterface::DIRECTION_FROM. Possible values are: TransitionInterface::DIRECTION_FROM or TransitionInterface::DIRECTION_TO.

Return value

\Drupal\workflows\TransitionInterface[] An array of the transition objects for the state in the given direction, keyed by transition ID.

See also

\Drupal\workflows\TransitionInterface::DIRECTION_FROM

\Drupal\workflows\TransitionInterface::DIRECTION_TO

1 method overrides WorkflowTypeInterface::getTransitionsForState()
WorkflowTypeBase::getTransitionsForState in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Gets the transitions for a state for the provided direction.

File

core/modules/workflows/src/WorkflowTypeInterface.php, line 263

Class

WorkflowTypeInterface
An interface for Workflow type plugins.

Namespace

Drupal\workflows

Code

public function getTransitionsForState($state_id, $direction = TransitionInterface::DIRECTION_FROM);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.