Mercurial > hg > cmmr2012-drupal-site
view 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 |
line wrap: on
line source
<?php namespace Drupal\content_moderation; use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Session\AccountInterface; /** * Validates whether a certain state transition is allowed. */ interface StateTransitionValidationInterface { /** * Gets a list of transitions that are legal for this user on this entity. * * @param \Drupal\Core\Entity\ContentEntityInterface $entity * The entity to be transitioned. * @param \Drupal\Core\Session\AccountInterface $user * The account that wants to perform a transition. * * @return \Drupal\workflows\Transition[] * The list of transitions that are legal for this user on this entity. */ public function getValidTransitions(ContentEntityInterface $entity, AccountInterface $user); }