ContentModerationState
class ContentModerationState implements StateInterface (View source)
A value object representing a workflow state for content moderation.
Properties
| protected StateInterface | $state | The vanilla state object from the Workflow module. |
|
| protected bool | $published | If entities should be published if in this state. |
|
| protected bool | $defaultRevision | If entities should be the default revision if in this state. |
Methods
ContentModerationState constructor.
Determines if entities should be published if in this state.
Determines if entities should be the default revision if in this state.
Gets the state's ID.
Gets the state's label.
Gets the state's weight.
Determines if the state can transition to the provided state ID.
No description
Gets all the possible transition objects for the state.
Details
__construct(StateInterface $state, bool $published = FALSE, bool $default_revision = FALSE)
ContentModerationState constructor.
Decorates state objects to add methods to determine if an entity should be published or made the default revision.
bool
isPublishedState()
Determines if entities should be published if in this state.
bool
isDefaultRevisionState()
Determines if entities should be the default revision if in this state.
string
id()
Gets the state's ID.
string
label()
Gets the state's label.
int
weight()
Gets the state's weight.
bool
canTransitionTo($to_state_id)
Determines if the state can transition to the provided state ID.
getTransitionTo($to_state_id)
No description
TransitionInterface[]
getTransitions()
Gets all the possible transition objects for the state.