diff --git a/core/modules/options/lib/Drupal/options/Plugin/field/field_type/ListItemBase.php b/core/modules/options/lib/Drupal/options/Plugin/field/field_type/ListItemBase.php index bc46a05..a6ccff0 100644 --- a/core/modules/options/lib/Drupal/options/Plugin/field/field_type/ListItemBase.php +++ b/core/modules/options/lib/Drupal/options/Plugin/field/field_type/ListItemBase.php @@ -48,7 +48,7 @@ public function getSettableValues(AccountInterface $account = NULL) { * {@inheritdoc} */ public function getSettableOptions(AccountInterface $account = NULL) { - $instance = $this->getInstance(); + $instance = $this->getFieldDefinition(); $entity = $this->getParent()->getParent(); if (!isset($entity)) { @@ -56,7 +56,7 @@ public function getSettableOptions(AccountInterface $account = NULL) { $entity = _field_create_entity_from_ids($ids); } - $allowed_options = options_allowed_values($this->getInstance(), $entity); + $allowed_options = options_allowed_values($this->getFieldDefinition(), $entity); return $allowed_options; } @@ -75,7 +75,7 @@ public static function schema(FieldInterface $field) { * {@inheritdoc} */ public function settingsForm(array $form, array &$form_state, $has_data) { - $instance = $this->getInstance(); + $instance = $this->getFieldDefinition(); $field = $instance->getField(); $settings = $field->getFieldSettings(); @@ -315,7 +315,7 @@ public function getConstraints() { $constraint_manager = \Drupal::typedData()->getValidationConstraintManager(); $constraints = parent::getConstraints(); - $instance = $this->getInstance(); + $instance = $this->getFieldDefinition(); $constraints[] = $constraint_manager->create('ComplexData', array( 'value' => array( 'AllowedValues' => array(