EntityTestCompositeConstraint.php
Same filename in this branch
Same filename in other branches
- 8.9.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php
- 8.9.x core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestCompositeConstraint.php
- 10 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php
- 10 core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestCompositeConstraint.php
- 11.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php
- 11.x core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestCompositeConstraint.php
Namespace
Drupal\entity_test\Plugin\Validation\ConstraintFile
-
core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Validation/ Constraint/ EntityTestCompositeConstraint.php
View source
<?php
namespace Drupal\entity_test\Plugin\Validation\Constraint;
use Drupal\Core\Entity\Plugin\Validation\Constraint\CompositeConstraintBase;
/**
* Constraint with multiple fields.
*
* @Constraint(
* id = "EntityTestComposite",
* label = @Translation("Constraint with multiple fields."),
* type = "entity"
* )
*/
class EntityTestCompositeConstraint extends CompositeConstraintBase {
public $message = 'Multiple fields are validated';
/**
* {@inheritdoc}
*/
public function coversFields() {
return [
'name',
'type',
];
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
EntityTestCompositeConstraint | Constraint with multiple fields. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.