Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/content_moderation/src/StateTransitionValidationInterface.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children | a9cd425dd02b |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
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 } |