commit 4694efa2d2c5d3594665003b1505c4ae8fdd8e68 Author: Matthew Radcliffe Date: Sun Dec 15 21:49:20 2013 -0500 Issue #2015689 by mradcliffe: Fix API change from getFieldSetting to getSetting for singular and plural methods change in #2143263. diff --git a/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListItemBase.php b/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListItemBase.php index 2d4f2a6..d614277 100644 --- a/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListItemBase.php +++ b/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListItemBase.php @@ -77,7 +77,7 @@ public static function schema(FieldInterface $field) { public function settingsForm(array $form, array &$form_state, $has_data) { $instance = $this->getFieldDefinition(); $field = $instance->getField(); - $settings = $field->getFieldSettings(); + $settings = $field->getSettings(); if (in_array($field->type, array('list_integer', 'list_float', 'list_text'))) { $element['allowed_values'] = array( @@ -216,7 +216,7 @@ public function validateAllowedValues($element, &$form_state) { // Prevent removing values currently in use. if ($has_data) { - $lost_keys = array_diff(array_keys($field->getFieldSetting('allowed_values')), array_keys($values)); + $lost_keys = array_diff(array_keys($field->getSetting('allowed_values')), array_keys($values)); if (_options_values_in_use($field, $lost_keys)) { \Drupal::formBuilder()->setError($element, $form_state, t('Allowed values list: some values are being removed while currently in use.')); }