You are here

public function StateTransitionValidationInterface::getValidTransitions in Drupal 8

Same name and namespace in other branches
  1. 9 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);