diff --git a/core/config/schema/core.data_types.schema.yml b/core/config/schema/core.data_types.schema.yml index 800601f..f482e92 100644 --- a/core/config/schema/core.data_types.schema.yml +++ b/core/config/schema/core.data_types.schema.yml @@ -268,6 +268,9 @@ config_entity: uuid: type: string label: 'UUID' + langcode: + type: string + label: 'Language code' status: type: boolean label: 'Status' diff --git a/core/modules/config/src/Tests/ConfigImportUITest.php b/core/modules/config/src/Tests/ConfigImportUITest.php index 68f8b78..4f3aea5 100644 --- a/core/modules/config/src/Tests/ConfigImportUITest.php +++ b/core/modules/config/src/Tests/ConfigImportUITest.php @@ -60,8 +60,8 @@ function testImport() { // Create new config entity. $original_dynamic_data = array( - 'langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId(), 'uuid' => '30df59bd-7b03-4cf7-bb35-d42fc49f0651', + 'langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId(), 'status' => TRUE, 'dependencies' => array(), 'id' => 'new', @@ -367,8 +367,8 @@ function testImportErrorLog() { $uuid = $this->container->get('uuid'); $values_primary = array( - 'langcode' => 'en', 'uuid' => $uuid->generate(), + 'langcode' => 'en', 'status' => TRUE, 'dependencies' => array(), 'id' => 'primary', @@ -381,8 +381,8 @@ function testImportErrorLog() { ); $staging->write($name_primary, $values_primary); $values_secondary = array( - 'langcode' => 'en', 'uuid' => $uuid->generate(), + 'langcode' => 'en', 'status' => TRUE, // Add a dependency on primary, to ensure that is synced first. 'dependencies' => array( diff --git a/core/modules/config/src/Tests/ConfigImporterTest.php b/core/modules/config/src/Tests/ConfigImporterTest.php index 01ae40e..a6b2312 100644 --- a/core/modules/config/src/Tests/ConfigImporterTest.php +++ b/core/modules/config/src/Tests/ConfigImporterTest.php @@ -165,8 +165,8 @@ function testNew() { // Create new config entity. $original_dynamic_data = array( - 'langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId(), 'uuid' => '30df59bd-7b03-4cf7-bb35-d42fc49f0651', + 'langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId(), 'status' => TRUE, 'dependencies' => array(), 'id' => 'new', diff --git a/core/modules/config/src/Tests/ConfigSchemaTest.php b/core/modules/config/src/Tests/ConfigSchemaTest.php index 214ecbd..cf7cc08 100644 --- a/core/modules/config/src/Tests/ConfigSchemaTest.php +++ b/core/modules/config/src/Tests/ConfigSchemaTest.php @@ -96,14 +96,14 @@ function testSchemaMapping() { $expected = array(); $expected['label'] = 'Maintenance mode'; $expected['class'] = '\Drupal\Core\Config\Schema\Mapping'; - $expected['mapping']['langcode'] = array( - 'label' => 'Language code', - 'type' => 'string', - ); $expected['mapping']['message'] = array( 'label' => 'Message to display when in maintenance mode', 'type' => 'text', ); + $expected['mapping']['langcode'] = array( + 'label' => 'Language code', + 'type' => 'string', + ); $expected['type'] = 'system.maintenance'; $expected['definition_class'] = '\Drupal\Core\TypedData\MapDataDefinition'; $this->assertEqual($definition, $expected, 'Retrieved the right metadata for system.maintenance'); @@ -152,11 +152,11 @@ function testSchemaMapping() { $expected['label'] = 'Image style'; $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']['name']['type'] = 'string'; $expected['mapping']['uuid']['type'] = 'string'; $expected['mapping']['uuid']['label'] = 'UUID'; + $expected['mapping']['langcode']['type'] = 'string'; + $expected['mapping']['langcode']['label'] = 'Language code'; $expected['mapping']['status']['type'] = 'boolean'; $expected['mapping']['status']['label'] = 'Status'; $expected['mapping']['dependencies']['type'] = 'config_dependencies'; diff --git a/core/modules/language/config/schema/language.schema.yml b/core/modules/language/config/schema/language.schema.yml index 20f9043..5e3f55b 100644 --- a/core/modules/language/config/schema/language.schema.yml +++ b/core/modules/language/config/schema/language.schema.yml @@ -74,7 +74,6 @@ language.negotiation: type: string label: 'Selected language' -# @todo top level type cannot be an entity language.mappings: type: config_object label: 'Language mapping'