class SchedulerPublishOnConstraint in Scheduler 8
Same name and namespace in other branches
- 2.x src/Plugin/Validation/Constraint/SchedulerPublishOnConstraint.php \Drupal\scheduler\Plugin\Validation\Constraint\SchedulerPublishOnConstraint
Validates publish on values.
Plugin annotation
@Constraint(
id = "SchedulerPublishOn",
label = @Translation("Scheduler publish on", context = "Validation"),
type = "entity:node"
)
Hierarchy
- class \Drupal\Core\Entity\Plugin\Validation\Constraint\CompositeConstraintBase extends \Symfony\Component\Validator\Constraint
- class \Drupal\scheduler\Plugin\Validation\Constraint\SchedulerPublishOnConstraint
Expanded class hierarchy of SchedulerPublishOnConstraint
File
- src/
Plugin/ Validation/ Constraint/ SchedulerPublishOnConstraint.php, line 16
Namespace
Drupal\scheduler\Plugin\Validation\ConstraintView source
class SchedulerPublishOnConstraint extends CompositeConstraintBase {
/**
* Message shown when publish_on is not the future.
*
* @var string
*/
public $messagePublishOnDateNotInFuture = "The 'publish on' date must be in the future.";
/**
* {@inheritdoc}
*/
public function coversFields() {
return [
'publish_on',
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SchedulerPublishOnConstraint:: |
public | property | Message shown when publish_on is not the future. | |
SchedulerPublishOnConstraint:: |
public | function |
An array of entity fields which should be passed to the validator. Overrides CompositeConstraintBase:: |