function StateTransitionValidationInterface::getValidTransitions

Same name in other branches
  1. 9 core/modules/content_moderation/src/StateTransitionValidationInterface.php \Drupal\content_moderation\StateTransitionValidationInterface::getValidTransitions()
  2. 10 core/modules/content_moderation/src/StateTransitionValidationInterface.php \Drupal\content_moderation\StateTransitionValidationInterface::getValidTransitions()
  3. 11.x core/modules/content_moderation/src/StateTransitionValidationInterface.php \Drupal\content_moderation\StateTransitionValidationInterface::getValidTransitions()

Gets a list of transitions that are legal for this user on this entity.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The entity to be transitioned.

\Drupal\Core\Session\AccountInterface $user: The account that wants to perform a transition.

Return value

\Drupal\workflows\Transition[] The list of transitions that are legal for this user on this entity.

1 method overrides StateTransitionValidationInterface::getValidTransitions()
StateTransitionValidation::getValidTransitions in core/modules/content_moderation/src/StateTransitionValidation.php
Gets a list of transitions that are legal for this user on this entity.

File

core/modules/content_moderation/src/StateTransitionValidationInterface.php, line 26

Class

StateTransitionValidationInterface
Validates whether a certain state transition is allowed.

Namespace

Drupal\content_moderation

Code

public function getValidTransitions(ContentEntityInterface $entity, AccountInterface $user);

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