protected function StateTransitionValidation::getPossibleTransitions in Workbench Moderation 8.2
Same name and namespace in other branches
- 8 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 79
Class
- StateTransitionValidation
- Validates whether a certain state transition is allowed.
Namespace
Drupal\workbench_moderationCode
protected function getPossibleTransitions() {
if (empty($this->possibleTransitions)) {
$this->possibleTransitions = $this
->calculatePossibleTransitions();
}
return $this->possibleTransitions;
}