class ModerationStateConstraint in Drupal 8
Same name and namespace in other branches
- 9 core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraint.php \Drupal\content_moderation\Plugin\Validation\Constraint\ModerationStateConstraint
Verifies that nodes have a valid moderation state.
Plugin annotation
@Constraint(
id = "ModerationState",
label = @Translation("Valid moderation state", context = "Validation")
)
Hierarchy
- class \Drupal\content_moderation\Plugin\Validation\Constraint\ModerationStateConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of ModerationStateConstraint
File
- core/
modules/ content_moderation/ src/ Plugin/ Validation/ Constraint/ ModerationStateConstraint.php, line 15
Namespace
Drupal\content_moderation\Plugin\Validation\ConstraintView source
class ModerationStateConstraint extends Constraint {
public $message = 'Invalid state transition from %from to %to';
public $invalidStateMessage = 'State %state does not exist on %workflow workflow';
public $invalidTransitionAccess = 'You do not have access to transition from %original_state to %new_state';
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ModerationStateConstraint:: |
public | property | ||
ModerationStateConstraint:: |
public | property | ||
ModerationStateConstraint:: |
public | property |