Mercurial > hg > cmmr2012-drupal-site
annotate 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 |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\content_moderation; |
Chris@0 | 4 |
Chris@0 | 5 use Drupal\Core\Entity\ContentEntityInterface; |
Chris@0 | 6 use Drupal\Core\Session\AccountInterface; |
Chris@0 | 7 |
Chris@0 | 8 /** |
Chris@0 | 9 * Validates whether a certain state transition is allowed. |
Chris@0 | 10 */ |
Chris@0 | 11 interface StateTransitionValidationInterface { |
Chris@0 | 12 |
Chris@0 | 13 /** |
Chris@0 | 14 * Gets a list of transitions that are legal for this user on this entity. |
Chris@0 | 15 * |
Chris@0 | 16 * @param \Drupal\Core\Entity\ContentEntityInterface $entity |
Chris@0 | 17 * The entity to be transitioned. |
Chris@0 | 18 * @param \Drupal\Core\Session\AccountInterface $user |
Chris@0 | 19 * The account that wants to perform a transition. |
Chris@0 | 20 * |
Chris@0 | 21 * @return \Drupal\workflows\Transition[] |
Chris@0 | 22 * The list of transitions that are legal for this user on this entity. |
Chris@0 | 23 */ |
Chris@0 | 24 public function getValidTransitions(ContentEntityInterface $entity, AccountInterface $user); |
Chris@0 | 25 |
Chris@0 | 26 } |