class SchedulerModerationConstraint in Scheduler content moderation integration 8
Validates publish on values.
Plugin annotation
@Constraint(
id = "SchedulerModeration",
label = @Translation("Scheduler publish state transition validation", context = "Validation"),
type = "entity:node"
)
Hierarchy
- class \Drupal\Core\Entity\Plugin\Validation\Constraint\CompositeConstraintBase extends \Symfony\Component\Validator\Constraint
- class \Drupal\scheduler_content_moderation_integration\Plugin\Validation\Constraint\SchedulerModerationConstraint
Expanded class hierarchy of SchedulerModerationConstraint
File
- src/
Plugin/ Validation/ Constraint/ SchedulerModerationConstraint.php, line 16
Namespace
Drupal\scheduler_content_moderation_integration\Plugin\Validation\ConstraintView source
class SchedulerModerationConstraint extends CompositeConstraintBase {
/**
* Message for invalid publishing/un-publishing to a moderation state.
*
* @var string
*/
public $messagePublishModerationInvalid = "Invalid moderation transition, adjust the node's current state.";
/**
* {@inheritdoc}
*/
public function coversFields() {
return [
'publish_state',
'unpublish_state',
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SchedulerModerationConstraint:: |
public | property | Message for invalid publishing/un-publishing to a moderation state. | |
SchedulerModerationConstraint:: |
public | function |
An array of entity fields which should be passed to the validator. Overrides CompositeConstraintBase:: |