3 namespace Drupal\content_moderation;
5 use Drupal\Core\Entity\ContentEntityInterface;
6 use Drupal\Core\Session\AccountInterface;
9 * Validates whether a certain state transition is allowed.
11 interface StateTransitionValidationInterface {
14 * Gets a list of transitions that are legal for this user on this entity.
16 * @param \Drupal\Core\Entity\ContentEntityInterface $entity
17 * The entity to be transitioned.
18 * @param \Drupal\Core\Session\AccountInterface $user
19 * The account that wants to perform a transition.
21 * @return \Drupal\workflows\Transition[]
22 * The list of transitions that are legal for this user on this entity.
24 public function getValidTransitions(ContentEntityInterface $entity, AccountInterface $user);