You are here

public function EntityTestCompositeConstraint::coversFields in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestCompositeConstraint.php \Drupal\entity_test\Plugin\Validation\Constraint\EntityTestCompositeConstraint::coversFields()

An array of entity fields which should be passed to the validator.

Return value

string[] An array of field names.

Overrides CompositeConstraintBase::coversFields

File

core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestCompositeConstraint.php, line 23

Class

EntityTestCompositeConstraint
Constraint with multiple fields.

Namespace

Drupal\entity_test\Plugin\Validation\Constraint

Code

public function coversFields() {
  return [
    'name',
    'type',
  ];
}