function EntityHasFieldConstraint::getDefaultOption
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraint.php \Drupal\Core\Entity\Plugin\Validation\Constraint\EntityHasFieldConstraint::getDefaultOption()
- 8.9.x core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraint.php \Drupal\Core\Entity\Plugin\Validation\Constraint\EntityHasFieldConstraint::getDefaultOption()
- 11.x core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraint.php \Drupal\Core\Entity\Plugin\Validation\Constraint\EntityHasFieldConstraint::getDefaultOption()
@todo Add method return type declaration.
Return value
?string Name of the default option.
See also
https://www.drupal.org/project/drupal/issues/3425150
1 call to EntityHasFieldConstraint::getDefaultOption()
- EntityHasFieldConstraint::getRequiredOptions in core/
lib/ Drupal/ Core/ Entity/ Plugin/ Validation/ Constraint/ EntityHasFieldConstraint.php - @todo Add method return type declaration.
File
-
core/
lib/ Drupal/ Core/ Entity/ Plugin/ Validation/ Constraint/ EntityHasFieldConstraint.php, line 50
Class
- EntityHasFieldConstraint
- Checks if a value is an entity that has a specific field.
Namespace
Drupal\Core\Entity\Plugin\Validation\ConstraintCode
public function getDefaultOption() {
return 'field_name';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.