diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php index af2efb6..5fffc37 100644 --- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php +++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php @@ -21,7 +21,7 @@ class AllowedValuesConstraintValidator extends ChoiceValidator { */ public function validate($value, Constraint $constraint) { if ($this->context->getMetadata()->getTypedData() instanceof AllowedValuesInterface) { - $allowed_values = $this->context->getMetadata()->getTypedData()->getAllPossibleValues(); + $allowed_values = $this->context->getMetadata()->getTypedData()->getSettableValues(); $constraint->choices = $allowed_values; } return parent::validate($value, $constraint); diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigEntityReferenceItemBase.php b/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigEntityReferenceItemBase.php index d95a4dd..6f86275 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigEntityReferenceItemBase.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigEntityReferenceItemBase.php @@ -153,7 +153,7 @@ public function instanceSettingsForm(array $form, array &$form_state) { * * @see \Drupal\Core\TypedData\AllowedValuesInterface */ - public function getOptions() { + public function getSettableOptions() { $definition = $this->getPluginDefinition(); $callback = "{$definition['module']}_options_list"; if (function_exists($callback)) {