StateTransitionValidationInterface::getValidTransitionTargets

public StateTransitionValidationInterface::getValidTransitionTargets(ContentEntityInterface $entity, AccountInterface $user)

Gets a list of states a user may transition an entity to.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The entity to be transitioned.

\Drupal\Core\Session\AccountInterface $user: The account that wants to perform a transition.

Return value

\Drupal\content_moderation\Entity\ModerationState[] Returns an array of States to which the specified user may transition the entity.

File

core/modules/content_moderation/src/StateTransitionValidationInterface.php, line 25

Class

StateTransitionValidationInterface
Validates whether a certain state transition is allowed.

Namespace

Drupal\content_moderation

Code

public function getValidTransitionTargets(ContentEntityInterface $entity, AccountInterface $user);
doc_Drupal
2016-10-29 09:44:20
Comments
Leave a Comment

Please login to continue.