public function StateItem::isTransitionAllowed in State Machine 8
Gets whether the given transition is allowed.
Parameters
string $transition_id: The transition ID.
Return value
bool TRUE if the given transition is allowed, FALSE otherwise.
Overrides StateItemInterface::isTransitionAllowed
1 call to StateItem::isTransitionAllowed()
- StateItem::applyTransition in src/Plugin/ Field/ FieldType/ StateItem.php 
- Applies the given transition, changing the current state.
File
- src/Plugin/ Field/ FieldType/ StateItem.php, line 319 
Class
- StateItem
- Plugin implementation of the 'state' field type.
Namespace
Drupal\state_machine\Plugin\Field\FieldTypeCode
public function isTransitionAllowed($transition_id) {
  $allowed_transitions = $this
    ->getTransitions();
  return isset($allowed_transitions[$transition_id]);
}