function WorkflowTypeBase::getTransitions

Same name in other branches
  1. 8.9.x core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::getTransitions()
  2. 10 core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::getTransitions()
  3. 11.x core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::getTransitions()

Overrides WorkflowTypeInterface::getTransitions

1 call to WorkflowTypeBase::getTransitions()
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/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);
}

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