diff --git a/core/modules/field/field.views.inc b/core/modules/field/field.views.inc index e8f08bfff9b73b3e2423f544e300e9c57ac1bffe..33222ccf122410a06c26340d2a9bb29c4bf0a1c9 100644 --- a/core/modules/field/field.views.inc +++ b/core/modules/field/field.views.inc @@ -481,7 +481,7 @@ function list_field_views_data(FieldStorageConfigInterface $field_storage) { $data[$table_name][$field_name]['filter']['id'] = 'field_list'; } if (isset($field_data['argument']) && $field_name != 'delta') { - if ($field_storage->getType() == 'list_text') { + if ($field_storage->getType() == 'list_string') { $data[$table_name][$field_name]['argument']['id'] = 'field_list_string'; } else { diff --git a/core/modules/field/src/Tests/FormTest.php b/core/modules/field/src/Tests/FormTest.php index 88ef41f977f4d5fd15e69beed5aeba7c08cf0c0e..a97514ed18154a078b9e7853c261a63b251028f2 100644 --- a/core/modules/field/src/Tests/FormTest.php +++ b/core/modules/field/src/Tests/FormTest.php @@ -334,7 +334,7 @@ function testFieldFormMultivalueWithRequiredRadio() { entity_create('field_storage_config', array( 'name' => 'required_radio_test', 'entity_type' => 'entity_test', - 'type' => 'list_text', + 'type' => 'list_string', 'settings' => array( 'allowed_values' => array('yes' => 'yes', 'no' => 'no'), ), diff --git a/core/modules/migrate_drupal/config/install/migrate.migration.d6_field.yml b/core/modules/migrate_drupal/config/install/migrate.migration.d6_field.yml index 9c7cb6fc416bec1617248efabb1ca5f91eedd523..8d4f723041a8deefdbf96e10ae81a59c7f19add6 100644 --- a/core/modules/migrate_drupal/config/install/migrate.migration.d6_field.yml +++ b/core/modules/migrate_drupal/config/install/migrate.migration.d6_field.yml @@ -35,8 +35,8 @@ process: optionwidgets_buttons: list_float optionwidgets_onoff: boolean text: - optionwidgets_select: list_text - optionwidgets_buttons: list_text + optionwidgets_select: list_string + optionwidgets_buttons: list_string optionwidgets_onoff: boolean text_textfield: text text_textarea: text_long diff --git a/core/modules/migrate_drupal/config/install/migrate.migration.d6_user_profile_field.yml b/core/modules/migrate_drupal/config/install/migrate.migration.d6_user_profile_field.yml index e9d892f19dfe4b2dca8cfe0897a236a285a917cf..add4d5122233d4d0d37b89191e20f83b342baaf0 100644 --- a/core/modules/migrate_drupal/config/install/migrate.migration.d6_user_profile_field.yml +++ b/core/modules/migrate_drupal/config/install/migrate.migration.d6_user_profile_field.yml @@ -16,7 +16,7 @@ process: checkbox: boolean date: datetime list: text - selection: list_text + selection: list_string textfield: text textarea: text_long url: link diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/FieldSettings.php b/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/FieldSettings.php index fefce8f60629391fe47d53d174f921951eb1720e..58fc6eae9ea79a696344b352da94d8e74f69d173 100644 --- a/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/FieldSettings.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/FieldSettings.php @@ -53,7 +53,7 @@ public function getSettings($field_type, $global_settings, $widget_settings) { $list = array_map('trim', $list); $list = array_filter($list, 'strlen'); switch ($field_type) { - case 'list_text': + case 'list_string': case 'list_integer': case 'list_float': foreach ($list as $value) { @@ -81,7 +81,7 @@ public function getSettings($field_type, $global_settings, $widget_settings) { ), ), 'datetime' => array('datetime_type' => 'datetime'), - 'list_text' => array( + 'list_string' => array( 'allowed_values' => $allowed_values, ), 'list_integer' => array( diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateProfileValuesTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateProfileValuesTest.php index fd33123b84469830caded552005b8cb702646c1d..680604bb462ca3e213ec9efea83fbd730b453358 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateProfileValuesTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateProfileValuesTest.php @@ -58,7 +58,7 @@ protected function setUp() { entity_create('field_storage_config', array( 'entity_type' => 'user', 'name' => 'profile_sold_to', - 'type' => 'list_text', + 'type' => 'list_string', 'settings' => array( 'allowed_values' => array( 'Pill spammers' => 'Pill spammers', diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityDisplayTest.php index 8e46411de477a07b15f41a25c97467fbe647c118..6d51782bec2653ab4cff8ec63c42e9b1ce691a1c 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityDisplayTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityDisplayTest.php @@ -50,7 +50,7 @@ protected function setUp() { entity_create('field_storage_config', array( 'entity_type' => 'user', 'name' => 'profile_sold_to', - 'type' => 'list_text', + 'type' => 'list_string', ))->save(); entity_create('field_storage_config', array( 'entity_type' => 'user', diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityFormDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityFormDisplayTest.php index 415234c0df2ad955805b524f36308cc9f7ca50fd..2abf4aa0e395449fb5a24887f80052fb5e7bbbba 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityFormDisplayTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityFormDisplayTest.php @@ -45,7 +45,7 @@ protected function setUp() { entity_create('field_storage_config', array( 'entity_type' => 'user', 'name' => 'profile_sold_to', - 'type' => 'list_text', + 'type' => 'list_string', ))->save(); entity_create('field_storage_config', array( 'entity_type' => 'user', diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldInstanceTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldInstanceTest.php index 0a8ea57a9e889f20e69e9084ae46e13e164af1c0..dfa00ed6864fd917db434496b313c4d353a71bb9 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldInstanceTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldInstanceTest.php @@ -99,7 +99,7 @@ protected function createFields() { 'profile_color' => 'text', 'profile_biography' => 'text_long', 'profile_sell_address' => 'boolean', - 'profile_sold_to' => 'list_text', + 'profile_sold_to' => 'list_string', 'profile_bands' => 'text', 'profile_blog' => 'link', 'profile_birthdate' => 'datetime', diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldTest.php index 94f479de5805b3c8dc9199c96401cec91c960933..3f89a9b088361ac08167081e16bd03edea677050 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldTest.php @@ -53,7 +53,7 @@ public function testUserProfileFields() { // Migrated selection field. $field_storage = entity_load('field_storage_config', 'user.profile_sold_to'); - $this->assertEqual($field_storage->type, 'list_text', 'Field type is list_text.'); + $this->assertEqual($field_storage->type, 'list_string', 'Field type is list_string.'); $settings = $field_storage->getSettings(); $this->assertEqual($settings['allowed_values'], array( 'Pill spammers' => 'Pill spammers', @@ -62,7 +62,7 @@ public function testUserProfileFields() { 'Faithful servant' => 'Faithful servant', 'Anonymous donor' => 'Anonymous donor', )); - $this->assertEqual($field_storage->type, 'list_text', 'Field type is list_text.'); + $this->assertEqual($field_storage->type, 'list_string', 'Field type is list_string.'); // Migrated list field. $field_storage = entity_load('field_storage_config', 'user.profile_bands'); diff --git a/core/modules/options/config/schema/options.schema.yml b/core/modules/options/config/schema/options.schema.yml index 8aca507402fc880c725682f0b23ae950239c3212..03cb81f3379beae17eaee227a11a288100d7c0d3 100644 --- a/core/modules/options/config/schema/options.schema.yml +++ b/core/modules/options/config/schema/options.schema.yml @@ -74,7 +74,7 @@ field.list_float.value: type: string label: 'Value' -field.list_text.storage_settings: +field.list_string.storage_settings: type: mapping label: 'List (text) settings' mapping: @@ -95,12 +95,12 @@ field.list_text.storage_settings: type: string label: 'Allowed values function' -field.list_text.field_settings: +field.list_string.field_settings: label: 'List (float)' type: mapping mapping: { } -field.list_text.value: +field.list_string.value: type: sequence label: 'Default value' sequence: diff --git a/core/modules/options/src/Plugin/Field/FieldFormatter/OptionsDefaultFormatter.php b/core/modules/options/src/Plugin/Field/FieldFormatter/OptionsDefaultFormatter.php index 42df92069bbc708147a1bab981e8c962d4d89cbf..61fb8b153a053fd27b4ecd75357c61d65311cf97 100644 --- a/core/modules/options/src/Plugin/Field/FieldFormatter/OptionsDefaultFormatter.php +++ b/core/modules/options/src/Plugin/Field/FieldFormatter/OptionsDefaultFormatter.php @@ -20,7 +20,7 @@ * field_types = { * "list_integer", * "list_float", - * "list_text", + * "list_string", * } * ) */ diff --git a/core/modules/options/src/Plugin/Field/FieldFormatter/OptionsKeyFormatter.php b/core/modules/options/src/Plugin/Field/FieldFormatter/OptionsKeyFormatter.php index 89f3eb0d2b77cc0edb93888a8910587f9564bd2b..9dd2524199cb8b54124b454c7a6ecdb7939c59ca 100644 --- a/core/modules/options/src/Plugin/Field/FieldFormatter/OptionsKeyFormatter.php +++ b/core/modules/options/src/Plugin/Field/FieldFormatter/OptionsKeyFormatter.php @@ -20,7 +20,7 @@ * field_types = { * "list_integer", * "list_float", - * "list_text", + * "list_string", * } * ) */ diff --git a/core/modules/options/src/Plugin/Field/FieldType/ListTextItem.php b/core/modules/options/src/Plugin/Field/FieldType/ListStringItem.php similarity index 92% rename from core/modules/options/src/Plugin/Field/FieldType/ListTextItem.php rename to core/modules/options/src/Plugin/Field/FieldType/ListStringItem.php index 43848e8d856360d2418661ade9ac7fff5dea6e1d..37053c3434b9317934d6225e401e5b2d3b5c2a6b 100644 --- a/core/modules/options/src/Plugin/Field/FieldType/ListTextItem.php +++ b/core/modules/options/src/Plugin/Field/FieldType/ListStringItem.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\options\Type\ListTextItem. + * Contains \Drupal\options\Type\ListStringItem. */ namespace Drupal\options\Plugin\Field\FieldType; @@ -11,17 +11,17 @@ use Drupal\Core\TypedData\DataDefinition; /** - * Plugin implementation of the 'list_text' field type. + * Plugin implementation of the 'list_string' field type. * * @FieldType( - * id = "list_text", + * id = "list_string", * label = @Translation("List (text)"), * description = @Translation("This field stores text values from a list of allowed 'value => label' pairs, i.e. 'US States': IL => Illinois, IA => Iowa, IN => Indiana."), * default_widget = "options_select", * default_formatter = "list_default", * ) */ -class ListTextItem extends ListItemBase { +class ListStringItem extends ListItemBase { /** * {@inheritdoc} diff --git a/core/modules/options/src/Plugin/Field/FieldWidget/ButtonsWidget.php b/core/modules/options/src/Plugin/Field/FieldWidget/ButtonsWidget.php index aed9a29489587c9b2fc3c6b3ca0d15426a18604a..d84854cf0dc1c629280ff78dd5227436d4609727 100644 --- a/core/modules/options/src/Plugin/Field/FieldWidget/ButtonsWidget.php +++ b/core/modules/options/src/Plugin/Field/FieldWidget/ButtonsWidget.php @@ -20,7 +20,7 @@ * "boolean", * "list_integer", * "list_float", - * "list_text", + * "list_string", * }, * multiple_values = TRUE * ) diff --git a/core/modules/options/src/Plugin/Field/FieldWidget/SelectWidget.php b/core/modules/options/src/Plugin/Field/FieldWidget/SelectWidget.php index 28a75d2c2cd973bf659bd97bd82c8d77e309e882..2c27c3a7ba1a6e3f37b4e4b6be0eee7d72372fa3 100644 --- a/core/modules/options/src/Plugin/Field/FieldWidget/SelectWidget.php +++ b/core/modules/options/src/Plugin/Field/FieldWidget/SelectWidget.php @@ -20,7 +20,7 @@ * field_types = { * "list_integer", * "list_float", - * "list_text" + * "list_string" * }, * multiple_values = TRUE * ) diff --git a/core/modules/options/src/Tests/OptionsDynamicValuesTestBase.php b/core/modules/options/src/Tests/OptionsDynamicValuesTestBase.php index 74978da5d782c5aa3c9f3c05eb3bd52e15fb4f00..d6f958f9214f71f70a14a71b2b9b33309969d7f6 100644 --- a/core/modules/options/src/Tests/OptionsDynamicValuesTestBase.php +++ b/core/modules/options/src/Tests/OptionsDynamicValuesTestBase.php @@ -35,7 +35,7 @@ protected function setUp() { entity_create('field_storage_config', array( 'name' => $this->field_name, 'entity_type' => 'entity_test_rev', - 'type' => 'list_text', + 'type' => 'list_string', 'cardinality' => 1, 'settings' => array( 'allowed_values_function' => 'options_test_dynamic_values_callback', diff --git a/core/modules/options/src/Tests/OptionsFieldUITest.php b/core/modules/options/src/Tests/OptionsFieldUITest.php index 584f012f87cfde36ff8259795b512ddcf83f7a20..fe2f45bfd35a0066a82503d1b32d141dc472748a 100644 --- a/core/modules/options/src/Tests/OptionsFieldUITest.php +++ b/core/modules/options/src/Tests/OptionsFieldUITest.php @@ -166,7 +166,7 @@ function testOptionsAllowedValuesFloat() { */ function testOptionsAllowedValuesText() { $this->field_name = 'field_options_text'; - $this->createOptionsField('list_text'); + $this->createOptionsField('list_string'); // Flat list of textual values. $string = "Zero\nOne"; @@ -231,7 +231,7 @@ function testOptionsAllowedValuesText() { */ function testOptionsTrimmedValuesText() { $this->field_name = 'field_options_trimmed_text'; - $this->createOptionsField('list_text'); + $this->createOptionsField('list_string'); // Explicit keys. $string = "zero |Zero\none | One"; @@ -243,7 +243,7 @@ function testOptionsTrimmedValuesText() { * Helper function to create list field of a given type. * * @param string $type - * 'list_integer', 'list_float' or 'list_text' + * 'list_integer', 'list_float' or 'list_string' */ protected function createOptionsField($type) { // Create a field.