StateTransitionValidationInterface::isTransitionAllowed

public StateTransitionValidationInterface::isTransitionAllowed(ModerationStateInterface $from, ModerationStateInterface $to) Determines a transition allowed. Parameters \Drupal\content_moderation\ModerationStateInterface $from: The origin state. \Drupal\content_moderation\ModerationStateInterface $to: The destination state. Return value bool Is the transition allowed. File core/modules/content_moderation/src/StateTransitionValidationInterface.php, line 69 Class StateTransitionValidationIn

StateTransitionValidationInterface::userMayTransition

public StateTransitionValidationInterface::userMayTransition(ModerationStateInterface $from, ModerationStateInterface $to, AccountInterface $user) Determines if a user is allowed to transition from one state to another. This method will also return FALSE if there is no transition between the specified states at all. Parameters \Drupal\content_moderation\ModerationStateInterface $from: The origin state. \Drupal\content_moderation\ModerationStateInterface $to: The destination state. \Drupal\Core

StateTransitionValidation::userMayTransition

public StateTransitionValidation::userMayTransition(ModerationStateInterface $from, ModerationStateInterface $to, AccountInterface $user) Determines if a user is allowed to transition from one state to another. This method will also return FALSE if there is no transition between the specified states at all. Parameters \Drupal\content_moderation\ModerationStateInterface $from: The origin state. \Drupal\content_moderation\ModerationStateInterface $to: The destination state. \Drupal\Core\Session\

StateTransitionValidationInterface

Validates whether a certain state transition is allowed. Hierarchy interface \Drupal\content_moderation\StateTransitionValidationInterface File core/modules/content_moderation/src/StateTransitionValidationInterface.php, line 11 Namespace Drupal\content_moderation Members Name Modifiers Type Description StateTransitionValidationInterface::getValidTransitions public function Gets a list of transitions that are legal for this user on this entity. StateTransitionValidation

StateTransitionValidation::__construct

public StateTransitionValidation::__construct(EntityTypeManagerInterface $entity_type_manager, QueryFactory $query_factory) Constructs a new StateTransitionValidation. Parameters \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service. \Drupal\Core\Entity\Query\QueryFactory $query_factory: The entity query factory. File core/modules/content_moderation/src/StateTransitionValidation.php, line 45 Class StateTransitionValidation Validates whether a

StateTransitionValidation::transitionStorage

protected StateTransitionValidation::transitionStorage() Returns the transition entity storage service. Return value \Drupal\Core\Entity\EntityStorageInterface The transition state entity storage. File core/modules/content_moderation/src/StateTransitionValidation.php, line 218 Class StateTransitionValidation Validates whether a certain state transition is allowed. Namespace Drupal\content_moderation Code protected function transitionStorage() { return $this->entityTypeManager->

StateTransitionValidation::isTransitionAllowed

public StateTransitionValidation::isTransitionAllowed(ModerationStateInterface $from, ModerationStateInterface $to) Determines a transition allowed. Parameters \Drupal\content_moderation\ModerationStateInterface $from: The origin state. \Drupal\content_moderation\ModerationStateInterface $to: The destination state. Return value bool Is the transition allowed. Overrides StateTransitionValidationInterface::isTransitionAllowed File core/modules/content_moderation/src/StateTransitionValidation.ph

StateTransitionValidation::transitionStateQuery

protected StateTransitionValidation::transitionStateQuery() Returns a transition state entity query. Return value \Drupal\Core\Entity\Query\QueryInterface A transition state entity query. File core/modules/content_moderation/src/StateTransitionValidation.php, line 208 Class StateTransitionValidation Validates whether a certain state transition is allowed. Namespace Drupal\content_moderation Code protected function transitionStateQuery() { return $this->queryFactory->get('moder

StateTransitionValidation::loadBundleEntity

protected StateTransitionValidation::loadBundleEntity($bundle_entity_type_id, $bundle_id) Loads a specific bundle entity. Parameters string $bundle_entity_type_id: The bundle entity type ID. string $bundle_id: The bundle ID. Return value \Drupal\Core\Config\Entity\ConfigEntityInterface|null The specific bundle entity. File core/modules/content_moderation/src/StateTransitionValidation.php, line 243 Class StateTransitionValidation Validates whether a certain state transition is allowed.

StateTransitionValidation::getValidTransitionTargets

public StateTransitionValidation::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 t