Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / content_moderation / src / StateTransitionValidationInterface.php
1 <?php
2
3 namespace Drupal\content_moderation;
4
5 use Drupal\Core\Entity\ContentEntityInterface;
6 use Drupal\Core\Session\AccountInterface;
7
8 /**
9  * Validates whether a certain state transition is allowed.
10  */
11 interface StateTransitionValidationInterface {
12
13   /**
14    * Gets a list of transitions that are legal for this user on this entity.
15    *
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.
20    *
21    * @return \Drupal\workflows\Transition[]
22    *   The list of transitions that are legal for this user on this entity.
23    */
24   public function getValidTransitions(ContentEntityInterface $entity, AccountInterface $user);
25
26 }