You are here

public function WorkflowTypeBase::getTransitions in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::getTransitions()
  2. 9 core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::getTransitions()

File

core/modules/workflows/src/Plugin/WorkflowTypeBase.php, line 261

Class

WorkflowTypeBase
A base class for Workflow type plugins.

Namespace

Drupal\workflows\Plugin

Code

public function getTransitions(array $transition_ids = NULL) {
  if ($transition_ids === NULL) {
    $transition_ids = array_keys($this->configuration['transitions']);
  }

  /** @var \Drupal\workflows\TransitionInterface[] $transitions */
  $transitions = array_combine($transition_ids, array_map([
    $this,
    'getTransition',
  ], $transition_ids));
  return static::labelWeightMultisort($transitions);
}