function State::canTransitionTo
Same name in other branches
- 9 core/modules/workflows/src/State.php \Drupal\workflows\State::canTransitionTo()
- 8.9.x core/modules/workflows/src/State.php \Drupal\workflows\State::canTransitionTo()
- 11.x core/modules/workflows/src/State.php \Drupal\workflows\State::canTransitionTo()
Overrides StateInterface::canTransitionTo
1 call to State::canTransitionTo()
- State::getTransitionTo in core/
modules/ workflows/ src/ State.php - Gets the Transition object for the provided state ID.
File
-
core/
modules/ workflows/ src/ State.php, line 81
Class
- State
- A value object representing a workflow state.
Namespace
Drupal\workflowsCode
public function canTransitionTo($to_state_id) {
return $this->workflow
->hasTransitionFromStateToState($this->id, $to_state_id);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.