You are here

protected function StateTransitionValidation::getPossibleTransitions in Workbench Moderation 8

Same name and namespace in other branches
  1. 8.2 src/StateTransitionValidation.php \Drupal\workbench_moderation\StateTransitionValidation::getPossibleTransitions()

Returns a mapping of possible transitions.

Return value

array[] An array containing all possible transitions. Each entry is keyed by the "from" state, and the value is an array of all legal "to" states based on the currently defined transition objects.

1 call to StateTransitionValidation::getPossibleTransitions()
StateTransitionValidation::getValidTransitionTargets in src/StateTransitionValidation.php
Gets a list of states a user may transition an entity to.

File

src/StateTransitionValidation.php, line 71

Class

StateTransitionValidation
Validates whether a certain state transition is allowed.

Namespace

Drupal\workbench_moderation

Code

protected function getPossibleTransitions() {
  if (empty($this->possibleTransitions)) {
    $this->possibleTransitions = $this
      ->calculatePossibleTransitions();
  }
  return $this->possibleTransitions;
}