diff --git a/core/config/schema/core.data_types.schema.yml b/core/config/schema/core.data_types.schema.yml index faab88954e68..cc89fa97a6cf 100644 --- a/core/config/schema/core.data_types.schema.yml +++ b/core/config/schema/core.data_types.schema.yml @@ -81,6 +81,14 @@ color_hex: # Complex extended data types: +# Root of a configuration object. +config_object: + type: mapping + mapping: + langcode: + type: string + label: 'Language code' + # Mail text with subject and body parts. mail: type: mapping @@ -121,7 +129,7 @@ action_configuration_default: type: string theme_settings: - type: mapping + type: config_object mapping: favicon: type: mapping @@ -183,12 +191,6 @@ theme_settings: sequence: type: theme_settings.third_party.[%key] -theme_breakpoints_default: - type: sequence - sequence: - type: string - label: 'Breakpoint value' - views_field_bulk_form: type: views_field label: 'Bulk operation' @@ -262,7 +264,7 @@ config_entity: label: 'UUID' langcode: type: string - label: 'Default language' + label: 'Language code' status: type: boolean label: 'Status' @@ -416,9 +418,6 @@ core.date_format.*: pattern: type: date_format label: 'PHP date format' - langcode: - type: string - label: 'Default language' # Generic field settings schemas. diff --git a/core/config/schema/core.extension.schema.yml b/core/config/schema/core.extension.schema.yml index f53e5e67cfe9..bdc84b9fee89 100644 --- a/core/config/schema/core.extension.schema.yml +++ b/core/config/schema/core.extension.schema.yml @@ -1,5 +1,5 @@ core.extension: - type: mapping + type: config_object label: 'Extension settings' mapping: module: diff --git a/core/config/schema/core.menu.schema.yml b/core/config/schema/core.menu.schema.yml index 069ec197ba32..1a6c268e1044 100644 --- a/core/config/schema/core.menu.schema.yml +++ b/core/config/schema/core.menu.schema.yml @@ -1,5 +1,5 @@ core.menu.static_menu_link_overrides: - type: mapping + type: config_object label: 'Static menu link overrides' mapping: definitions: diff --git a/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php b/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php index 00bbba5b56b7..5127adc2a46c 100644 --- a/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php +++ b/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php @@ -53,7 +53,7 @@ trait SchemaCheckTrait { if (!$typed_config->hasConfigSchema($config_name)) { return FALSE; } - $definition = $typed_config->getDefinition($config_name, TRUE, TRUE); + $definition = $typed_config->getDefinition($config_name); $data_definition = $typed_config->buildDataDefinition($definition, $config_data); $this->schema = $typed_config->create($data_definition, $config_data); $errors = array(); diff --git a/core/lib/Drupal/Core/Config/StorableConfigBase.php b/core/lib/Drupal/Core/Config/StorableConfigBase.php index 420925f20ab2..625900c28f9c 100644 --- a/core/lib/Drupal/Core/Config/StorableConfigBase.php +++ b/core/lib/Drupal/Core/Config/StorableConfigBase.php @@ -128,7 +128,7 @@ abstract class StorableConfigBase extends ConfigBase { */ protected function getSchemaWrapper() { if (!isset($this->schemaWrapper)) { - $definition = $this->typedConfigManager->getDefinition($this->name, TRUE, TRUE); + $definition = $this->typedConfigManager->getDefinition($this->name); $data_definition = $this->typedConfigManager->buildDataDefinition($definition, $this->data); $this->schemaWrapper = $this->typedConfigManager->create($data_definition, $this->data); } diff --git a/core/lib/Drupal/Core/Config/TypedConfigManager.php b/core/lib/Drupal/Core/Config/TypedConfigManager.php index 6fc202b129ae..42756d63f44f 100644 --- a/core/lib/Drupal/Core/Config/TypedConfigManager.php +++ b/core/lib/Drupal/Core/Config/TypedConfigManager.php @@ -72,7 +72,7 @@ class TypedConfigManager extends TypedDataManager implements TypedConfigManagerI */ public function get($name) { $data = $this->configStorage->read($name); - $type_definition = $this->getDefinition($name, TRUE, TRUE); + $type_definition = $this->getDefinition($name); $data_definition = $this->buildDataDefinition($type_definition, $data); return $this->create($data_definition, $data); } diff --git a/core/lib/Drupal/Core/Config/TypedConfigManagerInterface.php b/core/lib/Drupal/Core/Config/TypedConfigManagerInterface.php index 402cb8222e46..e9e562e92eb6 100644 --- a/core/lib/Drupal/Core/Config/TypedConfigManagerInterface.php +++ b/core/lib/Drupal/Core/Config/TypedConfigManagerInterface.php @@ -111,8 +111,8 @@ Interface TypedConfigManagerInterface extends PluginManagerInterface, CachedDisc * Ignored with TypedConfigManagerInterface. Kept for compatibility with * DiscoveryInterface. * @param bool $is_config_name - * Set to TRUE if $plugin_id is a configuration name (as opposed to an - * internal configuration schema type). + * (deprecated) Set to TRUE if $plugin_id is a configuration name (as + * opposed to an internal configuration schema type). * * @return array * A plugin definition array. If the given plugin id does not have typed diff --git a/core/modules/action/config/schema/action.schema.yml b/core/modules/action/config/schema/action.schema.yml index cd4e02c8043f..421e05fd1829 100644 --- a/core/modules/action/config/schema/action.schema.yml +++ b/core/modules/action/config/schema/action.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Action module. action.settings: - type: mapping + type: config_object label: 'Action settings' mapping: recursion_limit: diff --git a/core/modules/aggregator/config/schema/aggregator.schema.yml b/core/modules/aggregator/config/schema/aggregator.schema.yml index 97b3d3fd9d75..85710b85c176 100644 --- a/core/modules/aggregator/config/schema/aggregator.schema.yml +++ b/core/modules/aggregator/config/schema/aggregator.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the aggregator module. aggregator.settings: - type: mapping + type: config_object label: 'Aggregator settings' mapping: fetcher: diff --git a/core/modules/aggregator/tests/modules/aggregator_test/config/schema/aggregator_test.schema.yml b/core/modules/aggregator/tests/modules/aggregator_test/config/schema/aggregator_test.schema.yml index 63347daf5419..61d34413e522 100644 --- a/core/modules/aggregator/tests/modules/aggregator_test/config/schema/aggregator_test.schema.yml +++ b/core/modules/aggregator/tests/modules/aggregator_test/config/schema/aggregator_test.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Aggregator Test module. aggregator_test.settings: - type: mapping + type: config_object label: 'Aggregator test settings' mapping: items: diff --git a/core/modules/book/config/schema/book.schema.yml b/core/modules/book/config/schema/book.schema.yml index c9fb1bf5bd6f..97d2f933d7ce 100644 --- a/core/modules/book/config/schema/book.schema.yml +++ b/core/modules/book/config/schema/book.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the book module. book.settings: - type: mapping + type: config_object label: 'Book settings' mapping: allowed_types: diff --git a/core/modules/color/config/schema/color.schema.yml b/core/modules/color/config/schema/color.schema.yml index 008148cc1f9e..07ae1cccebf3 100644 --- a/core/modules/color/config/schema/color.schema.yml +++ b/core/modules/color/config/schema/color.schema.yml @@ -1,5 +1,5 @@ color.theme.*: - type: mapping + type: config_object label: 'Color theme settings' mapping: palette: diff --git a/core/modules/config/src/Tests/ConfigSchemaTest.php b/core/modules/config/src/Tests/ConfigSchemaTest.php index cf945d98a8cf..4082dfa96c4a 100644 --- a/core/modules/config/src/Tests/ConfigSchemaTest.php +++ b/core/modules/config/src/Tests/ConfigSchemaTest.php @@ -61,6 +61,8 @@ class ConfigSchemaTest extends KernelTestBase { $expected = array(); $expected['label'] = 'Schema test data'; $expected['class'] = '\Drupal\Core\Config\Schema\Mapping'; + $expected['mapping']['langcode']['type'] = 'string'; + $expected['mapping']['langcode']['label'] = 'Language code'; $expected['mapping']['testitem'] = array('label' => 'Test item'); $expected['mapping']['testlist'] = array('label' => 'Test list'); $expected['type'] = 'config_schema_test.someschema'; @@ -101,7 +103,7 @@ class ConfigSchemaTest extends KernelTestBase { 'type' => 'text', ); $expected['mapping']['langcode'] = array( - 'label' => 'Default language', + 'label' => 'Language code', 'type' => 'string', ); $expected['type'] = 'system.maintenance'; @@ -114,6 +116,10 @@ class ConfigSchemaTest extends KernelTestBase { $expected['label'] = 'Ignore test'; $expected['class'] = '\Drupal\Core\Config\Schema\Mapping'; $expected['definition_class'] = '\Drupal\Core\TypedData\MapDataDefinition'; + $expected['mapping']['langcode'] = array( + 'type' => 'string', + 'label' => 'Language code', + ); $expected['mapping']['label'] = array( 'label' => 'Label', 'type' => 'label', @@ -156,7 +162,7 @@ class ConfigSchemaTest extends KernelTestBase { $expected['mapping']['uuid']['type'] = 'string'; $expected['mapping']['uuid']['label'] = 'UUID'; $expected['mapping']['langcode']['type'] = 'string'; - $expected['mapping']['langcode']['label'] = 'Default language'; + $expected['mapping']['langcode']['label'] = 'Language code'; $expected['mapping']['status']['type'] = 'boolean'; $expected['mapping']['status']['label'] = 'Status'; $expected['mapping']['dependencies']['type'] = 'config_dependencies'; @@ -222,6 +228,8 @@ class ConfigSchemaTest extends KernelTestBase { $expected = array(); $expected['label'] = 'Schema multiple filesytem marker test'; $expected['class'] = '\Drupal\Core\Config\Schema\Mapping'; + $expected['mapping']['langcode']['type'] = 'string'; + $expected['mapping']['langcode']['label'] = 'Language code'; $expected['mapping']['testid']['type'] = 'string'; $expected['mapping']['testid']['label'] = 'ID'; $expected['mapping']['testdescription']['type'] = 'text'; @@ -396,6 +404,8 @@ class ConfigSchemaTest extends KernelTestBase { $expected['label'] = 'Schema wildcard fallback test'; $expected['class'] = '\Drupal\Core\Config\Schema\Mapping'; $expected['definition_class'] = '\Drupal\Core\TypedData\MapDataDefinition'; + $expected['mapping']['langcode']['type'] = 'string'; + $expected['mapping']['langcode']['label'] = 'Language code'; $expected['mapping']['testid']['type'] = 'string'; $expected['mapping']['testid']['label'] = 'ID'; $expected['mapping']['testdescription']['type'] = 'text'; diff --git a/core/modules/config/tests/config_collection_install_test/config/schema/config_collection_install_test.schema.yml b/core/modules/config/tests/config_collection_install_test/config/schema/config_collection_install_test.schema.yml index 6e93f9717a5d..e038e9fc24af 100644 --- a/core/modules/config/tests/config_collection_install_test/config/schema/config_collection_install_test.schema.yml +++ b/core/modules/config/tests/config_collection_install_test/config/schema/config_collection_install_test.schema.yml @@ -1,5 +1,5 @@ config_collection_install_test.test: - type: mapping + type: config_object label: 'Collection test' mapping: collection: diff --git a/core/modules/config/tests/config_events_test/config/schema/config_events_test.schema.yml b/core/modules/config/tests/config_events_test/config/schema/config_events_test.schema.yml index e3005b1ce12b..2153cc24fa34 100644 --- a/core/modules/config/tests/config_events_test/config/schema/config_events_test.schema.yml +++ b/core/modules/config/tests/config_events_test/config/schema/config_events_test.schema.yml @@ -1,5 +1,5 @@ config_events_test.test: - type: mapping + type: config_object label: 'Configuration events test' mapping: key: diff --git a/core/modules/config/tests/config_integration_test/config/schema/config_integration_test.schema.yml b/core/modules/config/tests/config_integration_test/config/schema/config_integration_test.schema.yml index 5010f01ffd93..337a721554d6 100644 --- a/core/modules/config/tests/config_integration_test/config/schema/config_integration_test.schema.yml +++ b/core/modules/config/tests/config_integration_test/config/schema/config_integration_test.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Configuration Integration Test module. config_integration_test.settings: - type: mapping + type: config_object label: 'Configuration integration test settings' mapping: foo: diff --git a/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml b/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml index 6b4f62d25a45..7c18496baf5d 100644 --- a/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml +++ b/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Configuration Schema Test module. config_schema_test.someschema: - type: mapping + type: config_object label: 'Schema test data' mapping: testitem: @@ -11,7 +11,7 @@ config_schema_test.someschema: config_schema_test.someschema.with_parents: label: 'Schema test data with parenting' - type: mapping + type: config_object mapping: one_level: label: 'Parenting one level up' @@ -64,7 +64,7 @@ config_schema_test.someschema.with_parents.key_3: type: string config_schema_test.someschema.somemodule.*.*: - type: mapping + type: config_object label: 'Schema multiple filesytem marker test' mapping: testid: @@ -75,7 +75,7 @@ config_schema_test.someschema.somemodule.*.*: label: 'Description' config_schema_test.wildcard_fallback.*: - type: mapping + type: config_object label: 'Schema wildcard fallback test' mapping: testid: @@ -86,7 +86,7 @@ config_schema_test.wildcard_fallback.*: label: 'Description' config_schema_test.schema_data_types: - type: mapping + type: config_object label: 'Config test schema' mapping: config_schema_test_integer: @@ -127,7 +127,7 @@ config_schema_test.schema_data_types: config_schema_test.schema_in_install: label: 'Schema test data with parenting' - type: mapping + type: config_object mapping: integer: type: integer @@ -138,7 +138,7 @@ config_schema_test_integer: label: 'Config test integer' config_schema_test.ignore: - type: mapping + type: config_object label: 'Ignore test' mapping: label: @@ -155,7 +155,7 @@ config_schema_test.ignore: label: 'Weight' config_schema_test.plugin_types: - type: mapping + type: config_object mapping: tests: type: sequence diff --git a/core/modules/config/tests/config_test/config/schema/config_test.schema.yml b/core/modules/config/tests/config_test/config/schema/config_test.schema.yml index e964db3152e7..6cad91b25f2d 100644 --- a/core/modules/config/tests/config_test/config/schema/config_test.schema.yml +++ b/core/modules/config/tests/config_test/config/schema/config_test.schema.yml @@ -56,7 +56,7 @@ config_test.query.*: label: 'number' config_test.types: - type: mapping + type: config_object label: 'Configuration type' mapping: array: @@ -94,7 +94,7 @@ config_test.types: label: 'String integer' config_test.no_status.default: - type: mapping + type: config_object label: 'Configuration no status default' mapping: id: @@ -105,7 +105,7 @@ config_test.no_status.default: label: 'Label' config_test.system: - type: mapping + type: config_object label: 'Configuration system' mapping: foo: @@ -119,7 +119,7 @@ config_test.system: label: '404' config_test.new: - type: mapping + type: config_object label: 'Configuration test' mapping: key: @@ -136,7 +136,7 @@ config_test.old: type: config_test.new config_test.foo: - type: mapping + type: config_object label: 'Configuration test' mapping: value: diff --git a/core/modules/config_translation/tests/modules/config_translation_test/config/schema/config_translation_test.schema.yml b/core/modules/config_translation/tests/modules/config_translation_test/config/schema/config_translation_test.schema.yml index a5ff2e6c89b6..63b84751d7e7 100644 --- a/core/modules/config_translation/tests/modules/config_translation_test/config/schema/config_translation_test.schema.yml +++ b/core/modules/config_translation/tests/modules/config_translation_test/config/schema/config_translation_test.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Configuration translation test module. config_translation_test.content: - type: mapping + type: config_object label: 'Content' mapping: id: @@ -10,9 +10,6 @@ config_translation_test.content: label: type: label label: 'Label' - langcode: - type: string - label: 'Default language' content: type: text_format label: 'Content' diff --git a/core/modules/contact/config/schema/contact.schema.yml b/core/modules/contact/config/schema/contact.schema.yml index 080a9c89c1f6..5a62e9da32e4 100644 --- a/core/modules/contact/config/schema/contact.schema.yml +++ b/core/modules/contact/config/schema/contact.schema.yml @@ -24,7 +24,7 @@ contact.form.*: label: 'Weight' contact.settings: - type: mapping + type: config_object label: 'Contact settings' mapping: default_form: diff --git a/core/modules/dblog/config/schema/dblog.schema.yml b/core/modules/dblog/config/schema/dblog.schema.yml index dfb6422cb32a..d7196da6da47 100644 --- a/core/modules/dblog/config/schema/dblog.schema.yml +++ b/core/modules/dblog/config/schema/dblog.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the dblog module. dblog.settings: - type: mapping + type: config_object label: 'Database logging settings' mapping: row_limit: diff --git a/core/modules/field/config/schema/field.schema.yml b/core/modules/field/config/schema/field.schema.yml index 9ea9b2edaecf..55760a74f772 100644 --- a/core/modules/field/config/schema/field.schema.yml +++ b/core/modules/field/config/schema/field.schema.yml @@ -1,7 +1,7 @@ # Schema for configuration files of the Field module. field.settings: - type: mapping + type: config_object label: 'Field settings' mapping: purge_batch_size: diff --git a/core/modules/field_ui/config/schema/field_ui.schema.yml b/core/modules/field_ui/config/schema/field_ui.schema.yml index fe7e95c2e052..f5421c38e179 100644 --- a/core/modules/field_ui/config/schema/field_ui.schema.yml +++ b/core/modules/field_ui/config/schema/field_ui.schema.yml @@ -1,7 +1,7 @@ # Schema for configuration files of the Field UI module. field_ui.settings: - type: mapping + type: config_object label: 'Field UI settings' mapping: field_prefix: diff --git a/core/modules/file/config/schema/file.schema.yml b/core/modules/file/config/schema/file.schema.yml index bbf4048c1616..e5892e57d417 100644 --- a/core/modules/file/config/schema/file.schema.yml +++ b/core/modules/file/config/schema/file.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the File module. file.settings: - type: mapping + type: config_object label: 'File settings' mapping: description: diff --git a/core/modules/filter/config/schema/filter.schema.yml b/core/modules/filter/config/schema/filter.schema.yml index ac956f7c39cf..b45a4755958c 100644 --- a/core/modules/filter/config/schema/filter.schema.yml +++ b/core/modules/filter/config/schema/filter.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Filter module. filter.settings: - type: mapping + type: config_object label: 'Filter settings' mapping: fallback_format: @@ -35,9 +35,6 @@ filter.format.*: label: 'Enabled filters' sequence: type: filter - langcode: - type: string - label: 'Default language' dependencies: type: config_dependencies label: 'Dependencies' diff --git a/core/modules/forum/config/schema/forum.schema.yml b/core/modules/forum/config/schema/forum.schema.yml index 2e01710cba4e..dbe44fc91fe6 100644 --- a/core/modules/forum/config/schema/forum.schema.yml +++ b/core/modules/forum/config/schema/forum.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Forum module. forum.settings: - type: mapping + type: config_object label: 'Forum settings' mapping: block: diff --git a/core/modules/image/config/schema/image.schema.yml b/core/modules/image/config/schema/image.schema.yml index 41dbb98262d9..4949fa3ef4a8 100644 --- a/core/modules/image/config/schema/image.schema.yml +++ b/core/modules/image/config/schema/image.schema.yml @@ -70,7 +70,7 @@ image.effect.image_scale_and_crop: label: 'Image scale and crop' image.settings: - type: mapping + type: config_object mapping: preview_image: type: string diff --git a/core/modules/language/config/install/language.mappings.yml b/core/modules/language/config/install/language.mappings.yml index f7fc321557ab..5c6419364292 100644 --- a/core/modules/language/config/install/language.mappings.yml +++ b/core/modules/language/config/install/language.mappings.yml @@ -1,12 +1,13 @@ # Browsers use different language codes to refer to the same languages, # these defaults handles the most common cases. -no: 'nb' # Norwegian -pt: 'pt-pt' # Portuguese -zh: 'zh-hans' # Default Chinese to simplified script -zh-tw: 'zh-hant' # Taiwan Chinese in traditional script -zh-hk: 'zh-hant' # Hong Kong Chinese in traditional script -zh-mo: 'zh-hant' # Macao Chinese in traditional script -zh-cht: 'zh-hant' # traditional Chinese -zh-cn: 'zh-hans' # PRC Mainland Chinese in simplified script -zh-sg: 'zh-hans' # Singapore Chinese in simplified script -zh-chs: 'zh-hans' # simplified Chinese +map: + no: 'nb' # Norwegian + pt: 'pt-pt' # Portuguese + zh: 'zh-hans' # Default Chinese to simplified script + zh-tw: 'zh-hant' # Taiwan Chinese in traditional script + zh-hk: 'zh-hant' # Hong Kong Chinese in traditional script + zh-mo: 'zh-hant' # Macao Chinese in traditional script + zh-cht: 'zh-hant' # traditional Chinese + zh-cn: 'zh-hans' # PRC Mainland Chinese in simplified script + zh-sg: 'zh-hans' # Singapore Chinese in simplified script + zh-chs: 'zh-hans' # simplified Chinese diff --git a/core/modules/language/config/schema/language.schema.yml b/core/modules/language/config/schema/language.schema.yml index 6c082e110760..5e3f55b5f756 100644 --- a/core/modules/language/config/schema/language.schema.yml +++ b/core/modules/language/config/schema/language.schema.yml @@ -18,7 +18,7 @@ language_type_negotiation: label: Weight language.types: - type: mapping + type: config_object label: 'Language types' mapping: all: @@ -41,7 +41,7 @@ language.types: label: 'Language negotiation per type setting' language.negotiation: - type: mapping + type: config_object label: 'Language detection methods' mapping: session: @@ -75,11 +75,14 @@ language.negotiation: label: 'Selected language' language.mappings: - type: sequence + type: config_object label: 'Language mapping' - sequence: - type: string - label: 'Language' + mapping: + map: + type: sequence + sequence: + type: string + label: 'Language' language.entity.*: type: config_entity diff --git a/core/modules/language/language.module b/core/modules/language/language.module index ae8c2e2f5fd4..4e7f017f9d56 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -448,7 +448,7 @@ function language_get_browser_drupal_langcode_mappings() { if ($config->isNew()) { return array(); } - return $config->get(); + return $config->get('map'); } /** diff --git a/core/modules/language/src/Form/NegotiationBrowserDeleteForm.php b/core/modules/language/src/Form/NegotiationBrowserDeleteForm.php index 1dc1447522de..73e0246a9419 100644 --- a/core/modules/language/src/Form/NegotiationBrowserDeleteForm.php +++ b/core/modules/language/src/Form/NegotiationBrowserDeleteForm.php @@ -71,7 +71,7 @@ class NegotiationBrowserDeleteForm extends ConfirmFormBase { */ public function submitForm(array &$form, FormStateInterface $form_state) { $this->config('language.mappings') - ->clear($this->browserLangcode) + ->clear('map.' . $this->browserLangcode) ->save(); $args = array( diff --git a/core/modules/language/src/Form/NegotiationBrowserForm.php b/core/modules/language/src/Form/NegotiationBrowserForm.php index 14ebb625985f..bf0ce4eb0028 100644 --- a/core/modules/language/src/Form/NegotiationBrowserForm.php +++ b/core/modules/language/src/Form/NegotiationBrowserForm.php @@ -180,7 +180,7 @@ class NegotiationBrowserForm extends ConfigFormBase { $mappings = $form_state->get('mappings'); if (!empty($mappings)) { $config = $this->config('language.mappings'); - $config->setData($mappings); + $config->setData(['map' => $mappings]); $config->save(); } @@ -198,7 +198,7 @@ class NegotiationBrowserForm extends ConfigFormBase { if ($config->isNew()) { return array(); } - return $config->get(); + return $config->get('map'); } } diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php index e9fc38e00e8e..9acd295bf169 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php @@ -39,7 +39,7 @@ class LanguageNegotiationBrowser extends LanguageNegotiationMethodBase { if ($this->languageManager && $request && $request->server->get('HTTP_ACCEPT_LANGUAGE')) { $http_accept_language = $request->server->get('HTTP_ACCEPT_LANGUAGE'); $langcodes = array_keys($this->languageManager->getLanguages()); - $mappings = $this->config->get('language.mappings')->get(); + $mappings = $this->config->get('language.mappings')->get('map'); $langcode = UserAgent::getBestMatchingLangcode($http_accept_language, $langcodes, $mappings); } diff --git a/core/modules/locale/config/schema/locale.schema.yml b/core/modules/locale/config/schema/locale.schema.yml index 72b89e1547b9..7321f60113f0 100644 --- a/core/modules/locale/config/schema/locale.schema.yml +++ b/core/modules/locale/config/schema/locale.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Locale module. locale.settings: - type: mapping + type: config_object label: 'Translate interface settings' mapping: cache_strings: diff --git a/core/modules/locale/src/LocaleConfigManager.php b/core/modules/locale/src/LocaleConfigManager.php index 17d1e8f5e4fa..d10cf188a3bf 100644 --- a/core/modules/locale/src/LocaleConfigManager.php +++ b/core/modules/locale/src/LocaleConfigManager.php @@ -134,7 +134,7 @@ class LocaleConfigManager { if ($this->isSupported($name)) { // Create typed configuration wrapper based on install storage data. $data = $this->installStorageRead($name); - $type_definition = $this->typedConfigManager->getDefinition($name, TRUE, TRUE); + $type_definition = $this->typedConfigManager->getDefinition($name); $data_definition = $this->typedConfigManager->buildDataDefinition($type_definition, $data); $typed_config = $this->typedConfigManager->create($data_definition, $data); if ($typed_config instanceof TraversableTypedDataInterface) { diff --git a/core/modules/locale/tests/modules/locale_test/config/schema/locale_test.schema.yml b/core/modules/locale/tests/modules/locale_test/config/schema/locale_test.schema.yml index daf3391e3ac7..f6cf7b900f89 100644 --- a/core/modules/locale/tests/modules/locale_test/config/schema/locale_test.schema.yml +++ b/core/modules/locale/tests/modules/locale_test/config/schema/locale_test.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Locale Test module. locale_test.no_translation: - type: mapping + type: config_object label: 'No traslation settings' mapping: test: @@ -9,11 +9,9 @@ locale_test.no_translation: label: 'Test' # See \Drupal\locale\Tests\LocaleConfigSubscriberTest translatable: true - langcode: - type: string locale_test.translation: - type: mapping + type: config_object label: 'translation settings' mapping: test: @@ -21,5 +19,3 @@ locale_test.translation: label: 'Test' # See \Drupal\locale\Tests\LocaleConfigSubscriberTest translatable: true - langcode: - type: string diff --git a/core/modules/migrate_drupal/config/schema/migrate_drupal.source.schema.yml b/core/modules/migrate_drupal/config/schema/migrate_drupal.source.schema.yml index f48c43e395bd..56ba96010606 100644 --- a/core/modules/migrate_drupal/config/schema/migrate_drupal.source.schema.yml +++ b/core/modules/migrate_drupal/config/schema/migrate_drupal.source.schema.yml @@ -331,7 +331,7 @@ migrate_entity_constant: label: 'Parent' langcode: type: string - label: 'Type' + label: 'Language code' third_party_settings: type: sequence label: 'Settings' diff --git a/core/modules/node/config/schema/node.schema.yml b/core/modules/node/config/schema/node.schema.yml index 3ec6c8e0ee14..dbc8ac9d9dea 100644 --- a/core/modules/node/config/schema/node.schema.yml +++ b/core/modules/node/config/schema/node.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the node module. node.settings: - type: mapping + type: config_object label: 'Node settings' mapping: use_admin_theme: diff --git a/core/modules/rest/config/schema/rest.schema.yml b/core/modules/rest/config/schema/rest.schema.yml index 21952ae1d839..8421d13e896d 100644 --- a/core/modules/rest/config/schema/rest.schema.yml +++ b/core/modules/rest/config/schema/rest.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the REST module. rest.settings: - type: mapping + type: config_object label: 'REST settings' mapping: resources: diff --git a/core/modules/search/config/schema/search.schema.yml b/core/modules/search/config/schema/search.schema.yml index 450c60c2d861..2ed4c09ba9a8 100644 --- a/core/modules/search/config/schema/search.schema.yml +++ b/core/modules/search/config/schema/search.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the search module. search.settings: - type: mapping + type: config_object label: 'Search settings' mapping: and_or_limit: diff --git a/core/modules/simpletest/config/schema/simpletest.schema.yml b/core/modules/simpletest/config/schema/simpletest.schema.yml index 5423adc08009..827ef560126b 100644 --- a/core/modules/simpletest/config/schema/simpletest.schema.yml +++ b/core/modules/simpletest/config/schema/simpletest.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Simpletest module. simpletest.settings: - type: mapping + type: config_object label: 'Testing' mapping: clear_results: diff --git a/core/modules/statistics/config/schema/statistics.schema.yml b/core/modules/statistics/config/schema/statistics.schema.yml index ff64363e80c8..81ed4381576b 100644 --- a/core/modules/statistics/config/schema/statistics.schema.yml +++ b/core/modules/statistics/config/schema/statistics.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the statistics module. statistics.settings: - type: mapping + type: config_object label: 'Statistics settings' mapping: access_log: diff --git a/core/modules/syslog/config/schema/syslog.schema.yml b/core/modules/syslog/config/schema/syslog.schema.yml index f2e7ca7f0059..5d2707a5a151 100644 --- a/core/modules/syslog/config/schema/syslog.schema.yml +++ b/core/modules/syslog/config/schema/syslog.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the syslog module. syslog.settings: - type: mapping + type: config_object label: 'Syslog settings' mapping: identity: diff --git a/core/modules/system/config/schema/system.schema.yml b/core/modules/system/config/schema/system.schema.yml index ba8fa1598b34..3ba947eb84ed 100644 --- a/core/modules/system/config/schema/system.schema.yml +++ b/core/modules/system/config/schema/system.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the System module. system.site: - type: mapping + type: config_object label: 'Site information' mapping: uuid: @@ -35,9 +35,6 @@ system.site: weight_select_max: type: integer label: 'Weight element maximum value' - langcode: - type: string - label: 'Language code' default_langcode: type: string label: 'Site default language code' @@ -46,18 +43,15 @@ system.site: label: 'Notification email address' system.maintenance: - type: mapping + type: config_object label: 'Maintenance mode' mapping: message: type: text label: 'Message to display when in maintenance mode' - langcode: - type: string - label: 'Default language' system.authorize: - type: mapping + type: config_object label: 'Authorize settings' mapping: filetransfer_default: @@ -65,7 +59,7 @@ system.authorize: label: 'Default file transfer protocol' system.cron: - type: mapping + type: config_object label: 'Cron settings' mapping: threshold: @@ -83,7 +77,7 @@ system.cron: label: 'Requirements error period' system.date: - type: mapping + type: config_object label: 'Date settings' mapping: first_day: @@ -96,9 +90,6 @@ system.date: default: type: string label: 'Default country' - langcode: - type: string - label: 'Default language' timezone: type: mapping label: 'Time zone settings' @@ -121,7 +112,7 @@ system.date: label: 'Remind users at login if their time zone is not set' system.diff: - type: mapping + type: config_object label: 'Diff settings' mapping: context: @@ -136,7 +127,7 @@ system.diff: label: 'Number of trailing lines in a diff' system.filter: - type: mapping + type: config_object label: 'Filter settings' mapping: protocols: @@ -147,7 +138,7 @@ system.filter: label: 'Protocol' system.logging: - type: mapping + type: config_object label: 'Logging settings' mapping: error_level: @@ -155,7 +146,7 @@ system.logging: label: 'Error messages to display' system.performance: - type: mapping + type: config_object label: 'Performance settings' mapping: cache: @@ -220,7 +211,7 @@ system.performance: label: 'Stale file threshold' system.rss: - type: mapping + type: config_object label: 'Feed settings' mapping: channel: @@ -240,12 +231,9 @@ system.rss: view_mode: type: string label: 'Feed content' - langcode: - type: string - label: 'Default language' system.theme: - type: mapping + type: config_object label: 'Theme settings' mapping: admin: @@ -292,7 +280,7 @@ system.action.*: type: action.configuration.[%parent.plugin] system.file: - type: mapping + type: config_object label: 'File system' mapping: allow_insecure_uploads: @@ -313,7 +301,7 @@ system.file: label: 'Maximum age for temporary files' system.image: - type: mapping + type: config_object label: 'Image settings' mapping: toolkit: @@ -321,7 +309,7 @@ system.image: label: 'Toolkit' system.image.gd: - type: mapping + type: config_object label: 'Image settings' mapping: jpeg_quality: @@ -329,7 +317,7 @@ system.image.gd: label: 'JPEG quality' system.mail: - type: mapping + type: config_object label: 'Mail system' mapping: interface: diff --git a/core/modules/system/tests/modules/form_test/config/schema/form_test.schema.yml b/core/modules/system/tests/modules/form_test/config/schema/form_test.schema.yml index 3e38933008fd..9af17cdd860c 100644 --- a/core/modules/system/tests/modules/form_test/config/schema/form_test.schema.yml +++ b/core/modules/system/tests/modules/form_test/config/schema/form_test.schema.yml @@ -1,5 +1,5 @@ form_test.object: - type: mapping + type: config_object label: 'Test form' mapping: bananas: diff --git a/core/modules/system/tests/modules/update_script_test/config/schema/update_script_test.schema.yml b/core/modules/system/tests/modules/update_script_test/config/schema/update_script_test.schema.yml index 6efa59433ec8..cc4031d29203 100644 --- a/core/modules/system/tests/modules/update_script_test/config/schema/update_script_test.schema.yml +++ b/core/modules/system/tests/modules/update_script_test/config/schema/update_script_test.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Update Script Test module. update_script_test.settings: - type: mapping + type: config_object label: '' mapping: requirement_type: diff --git a/core/modules/taxonomy/config/schema/taxonomy.schema.yml b/core/modules/taxonomy/config/schema/taxonomy.schema.yml index ef56111625be..efa08e154e69 100644 --- a/core/modules/taxonomy/config/schema/taxonomy.schema.yml +++ b/core/modules/taxonomy/config/schema/taxonomy.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Taxonomy module. taxonomy.settings: - type: mapping + type: config_object label: 'Taxonomy settings' mapping: maintain_index_table: diff --git a/core/modules/text/config/schema/text.schema.yml b/core/modules/text/config/schema/text.schema.yml index 03d9969e3364..dfc92cd2ba14 100644 --- a/core/modules/text/config/schema/text.schema.yml +++ b/core/modules/text/config/schema/text.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the text module. text.settings: - type: mapping + type: config_object label: 'Text settings' mapping: default_summary_length: diff --git a/core/modules/tracker/config/schema/tracker.schema.yml b/core/modules/tracker/config/schema/tracker.schema.yml index ccfe05312d15..ace7ec7183ea 100644 --- a/core/modules/tracker/config/schema/tracker.schema.yml +++ b/core/modules/tracker/config/schema/tracker.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the tracker module. tracker.settings: - type: mapping + type: config_object label: 'Tracker settings' mapping: cron_index_limit: diff --git a/core/modules/update/config/schema/update.schema.yml b/core/modules/update/config/schema/update.schema.yml index ee1924a833bf..b827c564d3df 100644 --- a/core/modules/update/config/schema/update.schema.yml +++ b/core/modules/update/config/schema/update.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Update module. update.settings: - type: mapping + type: config_object label: 'Update settings' mapping: check: diff --git a/core/modules/update/tests/modules/update_test/config/schema/update_test.schema.yml b/core/modules/update/tests/modules/update_test/config/schema/update_test.schema.yml index 69a84b743e25..c14e7985eb01 100644 --- a/core/modules/update/tests/modules/update_test/config/schema/update_test.schema.yml +++ b/core/modules/update/tests/modules/update_test/config/schema/update_test.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Update Test module. update_test.settings: - type: mapping + type: config_object label: 'Update test settings' mapping: system_info: diff --git a/core/modules/user/config/schema/user.schema.yml b/core/modules/user/config/schema/user.schema.yml index 09e5989e9714..9d853c17fd4f 100644 --- a/core/modules/user/config/schema/user.schema.yml +++ b/core/modules/user/config/schema/user.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the User module. user.settings: - type: mapping + type: config_object label: 'User settings' mapping: anonymous: @@ -50,12 +50,9 @@ user.settings: password_strength: type: boolean label: 'Enable password strength indicator' - langcode: - type: string - label: 'Default language' user.mail: - type: mapping + type: config_object label: 'Email settings' mapping: cancel_confirm: @@ -85,12 +82,9 @@ user.mail: status_canceled: type: mail label: 'Account cancelled' - langcode: - type: string - label: 'Default language' user.flood: - type: mapping + type: config_object label: 'User flood settings' mapping: uid_only: diff --git a/core/modules/views/config/schema/views.schema.yml b/core/modules/views/config/schema/views.schema.yml index e3293a17ae22..7ea599d32ec4 100644 --- a/core/modules/views/config/schema/views.schema.yml +++ b/core/modules/views/config/schema/views.schema.yml @@ -1,7 +1,7 @@ # Schema for the configuration files of the Views module. views.settings: - type: mapping + type: config_object label: 'Views settings' mapping: display_extenders: diff --git a/core/themes/stark/config/schema/stark.schema.yml b/core/themes/stark/config/schema/stark.schema.yml index 03311706e194..2b7f958b7ef9 100644 --- a/core/themes/stark/config/schema/stark.schema.yml +++ b/core/themes/stark/config/schema/stark.schema.yml @@ -3,7 +3,3 @@ stark.settings: type: theme_settings label: 'Stark settings' - -stark.breakpoints: - type: theme_breakpoints_default - label: 'Stark breakpoints'