class EntityTestCompositeConstraint
Same name in this branch
- 9 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php \Drupal\entity_test\Entity\EntityTestCompositeConstraint
Same name in other branches
- 8.9.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php \Drupal\entity_test\Entity\EntityTestCompositeConstraint
- 8.9.x core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestCompositeConstraint.php \Drupal\entity_test\Plugin\Validation\Constraint\EntityTestCompositeConstraint
- 10 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php \Drupal\entity_test\Entity\EntityTestCompositeConstraint
- 10 core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestCompositeConstraint.php \Drupal\entity_test\Plugin\Validation\Constraint\EntityTestCompositeConstraint
- 11.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestCompositeConstraint.php \Drupal\entity_test\Entity\EntityTestCompositeConstraint
- 11.x core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestCompositeConstraint.php \Drupal\entity_test\Plugin\Validation\Constraint\EntityTestCompositeConstraint
Constraint with multiple fields.
Plugin annotation
@Constraint(
id = "EntityTestComposite",
label = @Translation("Constraint with multiple fields."),
type = "entity"
)
Hierarchy
- class \Drupal\Core\Entity\Plugin\Validation\Constraint\CompositeConstraintBase extends \Symfony\Component\Validator\Constraint
- class \Drupal\entity_test\Plugin\Validation\Constraint\EntityTestCompositeConstraint extends \Drupal\Core\Entity\Plugin\Validation\Constraint\CompositeConstraintBase
Expanded class hierarchy of EntityTestCompositeConstraint
1 file declares its use of EntityTestCompositeConstraint
- EntityConstraintViolationListTest.php in core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityConstraintViolationListTest.php
File
-
core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Validation/ Constraint/ EntityTestCompositeConstraint.php, line 16
Namespace
Drupal\entity_test\Plugin\Validation\ConstraintView source
class EntityTestCompositeConstraint extends CompositeConstraintBase {
public $message = 'Multiple fields are validated';
/**
* {@inheritdoc}
*/
public function coversFields() {
return [
'name',
'type',
];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
EntityTestCompositeConstraint::$message | public | property | ||
EntityTestCompositeConstraint::coversFields | public | function | An array of entity fields which should be passed to the validator. | Overrides CompositeConstraintBase::coversFields |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.