function StateTransitionValidationInterface::isTransitionValid
Same name in other branches
- 9 core/modules/content_moderation/src/StateTransitionValidationInterface.php \Drupal\content_moderation\StateTransitionValidationInterface::isTransitionValid()
- 8.9.x core/modules/content_moderation/src/StateTransitionValidationInterface.php \Drupal\content_moderation\StateTransitionValidationInterface::isTransitionValid()
- 11.x core/modules/content_moderation/src/StateTransitionValidationInterface.php \Drupal\content_moderation\StateTransitionValidationInterface::isTransitionValid()
Checks if a transition between two states if valid for the given user.
Parameters
\Drupal\workflows\WorkflowInterface $workflow: The workflow entity.
\Drupal\workflows\StateInterface $original_state: The original workflow state.
\Drupal\workflows\StateInterface $new_state: The new workflow state.
\Drupal\Core\Session\AccountInterface $user: The user to validate.
\Drupal\Core\Entity\ContentEntityInterface $entity: The entity to be transitioned.
Return value
bool Returns TRUE if transition is valid, otherwise FALSE.
File
-
core/
modules/ content_moderation/ src/ StateTransitionValidationInterface.php, line 45
Class
- StateTransitionValidationInterface
- Validates whether a certain state transition is allowed.
Namespace
Drupal\content_moderationCode
public function isTransitionValid(WorkflowInterface $workflow, StateInterface $original_state, StateInterface $new_state, AccountInterface $user, ContentEntityInterface $entity);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.