You are here

public function WorkflowTypeInterface::getTransitionsForState in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/workflows/src/WorkflowTypeInterface.php \Drupal\workflows\WorkflowTypeInterface::getTransitionsForState()

Gets the transition IDs 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

array The transition IDs for a state for the provided direction.

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 transition IDs 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);