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);
Please login to continue.