function StateInterface::canTransitionTo

Same name in other branches
  1. 9 core/modules/workflows/src/StateInterface.php \Drupal\workflows\StateInterface::canTransitionTo()
  2. 8.9.x core/modules/workflows/src/StateInterface.php \Drupal\workflows\StateInterface::canTransitionTo()
  3. 11.x core/modules/workflows/src/StateInterface.php \Drupal\workflows\StateInterface::canTransitionTo()

Determines if the state can transition to the provided state ID.

Parameters

$to_state_id: The state to transition to.

Return value

bool TRUE if the state can transition to the provided state ID. FALSE, if not.

2 methods override StateInterface::canTransitionTo()
ContentModerationState::canTransitionTo in core/modules/content_moderation/src/ContentModerationState.php
Determines if the state can transition to the provided state ID.
State::canTransitionTo in core/modules/workflows/src/State.php
Determines if the state can transition to the provided state ID.

File

core/modules/workflows/src/StateInterface.php, line 52

Class

StateInterface
An interface for state value objects.

Namespace

Drupal\workflows

Code

public function canTransitionTo($to_state_id);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.