StateTransitionValidation
class StateTransitionValidation implements StateTransitionValidationInterface (View source)
Validates whether a certain state transition is allowed.
Properties
| protected ModerationInformationInterface | $moderationInfo | The moderation information service. |
|
| protected array | $possibleTransitions | Stores the possible state transitions. |
Methods
__construct(ModerationInformationInterface $moderation_info)
Constructs a new StateTransitionValidation.
getValidTransitions(ContentEntityInterface $entity, AccountInterface $user)
Gets a list of transitions that are legal for this user on this entity.
bool
isTransitionValid(WorkflowInterface $workflow, StateInterface $original_state, StateInterface $new_state, AccountInterface $user, ContentEntityInterface $entity = NULL)
Checks if a transition between two states if valid for the given user.
Details
__construct(ModerationInformationInterface $moderation_info)
Constructs a new StateTransitionValidation.
Transition[]
getValidTransitions(ContentEntityInterface $entity, AccountInterface $user)
Gets a list of transitions that are legal for this user on this entity.
bool
isTransitionValid(WorkflowInterface $workflow, StateInterface $original_state, StateInterface $new_state, AccountInterface $user, ContentEntityInterface $entity = NULL)
Checks if a transition between two states if valid for the given user.