Mercurial > hg > isophonics-drupal-site
view core/modules/content_moderation/src/StateTransitionValidationInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 129ea1e6d783 |
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); }