StateTransitionValidation::getValidTransitions

public StateTransitionValidation::getValidTransitions(ContentEntityInterface $entity, AccountInterface $user) Gets a list of transitions that are legal for this user on this entity. 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\ModerationStateTransition[] The list of transitions that are legal for this user

StateTransitionValidation::$queryFactory

Entity query factory. Type: \Drupal\Core\Entity\Query\QueryFactory File core/modules/content_moderation/src/StateTransitionValidation.php, line 28 Class StateTransitionValidation Validates whether a certain state transition is allowed. Namespace Drupal\content_moderation Code protected $queryFactory;

StateTransitionValidation::calculatePossibleTransitions

protected StateTransitionValidation::calculatePossibleTransitions() Computes a mapping of possible transitions. This method is uncached and will recalculate the list on every request. In most cases you want to use getPossibleTransitions() instead. Return value array[] An array containing all possible transitions. Each entry is keyed by the "from" state, and the value is an array of all legal "to" states based on the currently defined transition objects. See also static::getPossibleTransitions

StateTransitionValidation::getPossibleTransitions

protected StateTransitionValidation::getPossibleTransitions() Returns a mapping of possible transitions. Return value array[] An array containing all possible transitions. Each entry is keyed by the "from" state, and the value is an array of all legal "to" states based on the currently defined transition objects. File core/modules/content_moderation/src/StateTransitionValidation.php, line 82 Class StateTransitionValidation Validates whether a certain state transition is allowed. Namespa

StateTransitionValidation::$possibleTransitions

Stores the possible state transitions. Type: array File core/modules/content_moderation/src/StateTransitionValidation.php, line 35 Class StateTransitionValidation Validates whether a certain state transition is allowed. Namespace Drupal\content_moderation Code protected $possibleTransitions = [];

StateTransitionValidation::getTransitionsFrom

protected StateTransitionValidation::getTransitionsFrom($state_name) Returns a list of possible transitions from a given state. This list is based only on those transitions that exist, not what transitions are legal in a given context. Parameters string $state_name: The machine name of the state from which we are transitioning. Return value ModerationStateTransition[] A list of possible transitions from a given state. File core/modules/content_moderation/src/StateTransitionValidation.php, lin

StateTransitionValidation::getTransitionFromStates

protected StateTransitionValidation::getTransitionFromStates(ModerationStateInterface $from, ModerationStateInterface $to) Returns the transition object that transitions from one state to another. Parameters \Drupal\content_moderation\ModerationStateInterface $from: The origin state. \Drupal\content_moderation\ModerationStateInterface $to: The destination state. Return value ModerationStateTransition|null A transition object, or NULL if there is no such transition. File core/modules/content_m

StatementPrefetch::__construct

public StatementPrefetch::__construct(\PDO $pdo_connection, Connection $connection, $query, array $driver_options = array()) File core/lib/Drupal/Core/Database/StatementPrefetch.php, line 129 Class StatementPrefetch An implementation of StatementInterface that prefetches all data. Namespace Drupal\Core\Database Code public function __construct(\PDO $pdo_connection, Connection $connection, $query, array $driver_options = array()) { $this->pdoConnection = $pdo_connection; $this-&g

StatementPrefetch::valid

public StatementPrefetch::valid() File core/lib/Drupal/Core/Database/StatementPrefetch.php, line 349 Class StatementPrefetch An implementation of StatementInterface that prefetches all data. Namespace Drupal\Core\Database Code public function valid() { return isset($this->currentRow); }

StateTransitionValidation::$entityTypeManager

Entity type manager. Type: \Drupal\Core\Entity\EntityTypeManagerInterface File core/modules/content_moderation/src/StateTransitionValidation.php, line 21 Class StateTransitionValidation Validates whether a certain state transition is allowed. Namespace Drupal\content_moderation Code protected $entityTypeManager;