function EntityHasFieldConstraint::getDefaultOption

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraint.php \Drupal\Core\Entity\Plugin\Validation\Constraint\EntityHasFieldConstraint::getDefaultOption()

File

core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraint.php, line 42

Class

EntityHasFieldConstraint
Checks if a value is an entity that has a specific field.

Namespace

Drupal\Core\Entity\Plugin\Validation\Constraint

Code

public function getDefaultOption() {
  return 'field_name';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.