function EntityHasFieldConstraint::getRequiredOptions

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraint.php \Drupal\Core\Entity\Plugin\Validation\Constraint\EntityHasFieldConstraint::getRequiredOptions()
  2. 8.9.x core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraint.php \Drupal\Core\Entity\Plugin\Validation\Constraint\EntityHasFieldConstraint::getRequiredOptions()
  3. 11.x core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraint.php \Drupal\Core\Entity\Plugin\Validation\Constraint\EntityHasFieldConstraint::getRequiredOptions()

@todo Add method return type declaration.

Return value

array The names of the required options.

See also

https://www.drupal.org/project/drupal/issues/3425150

File

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

Class

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

Namespace

Drupal\Core\Entity\Plugin\Validation\Constraint

Code

public function getRequiredOptions() {
    return (array) $this->getDefaultOption();
}

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