public function ContentModerationState::getTransitionTo in Drupal 8
Same name and namespace in other branches
- 9 core/modules/content_moderation/src/ContentModerationState.php \Drupal\content_moderation\ContentModerationState::getTransitionTo()
Gets the Transition object for the provided state ID.
Parameters
$to_state_id: The state to transition to.
Return value
\Drupal\workflows\TransitionInterface The Transition object for the provided state ID.
Throws
\InvalidArgumentException() Exception thrown when the provided state ID can not be transitioned to.
Overrides StateInterface::getTransitionTo
File
- core/
modules/ content_moderation/ src/ ContentModerationState.php, line 103
Class
- ContentModerationState
- A value object representing a workflow state for content moderation.
Namespace
Drupal\content_moderationCode
public function getTransitionTo($to_state_id) {
return $this->state
->getTransitionTo($to_state_id);
}