diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php b/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php index b9b6e97..6fd8a54 100644 --- a/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php +++ b/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php @@ -240,7 +240,8 @@ protected function attachPropertyData(array &$entities, $load_revision = FALSE) foreach ($field_definition as $name => $definition) { // Set translatable properties only. if (isset($data_fields[$name]) && !empty($definition['translatable'])) { - $translation->{$name}->value = $values[$name]; + $key_name = key($translation->{$name}->offsetGet(0)->getProperties()); + $translation->{$name}->{$key_name} = $values[$name]; } // Avoid initializing configurable fields before loading them. elseif (!empty($definition['configurable'])) { @@ -462,7 +463,8 @@ protected function mapToDataStorageRecord(EntityInterface $entity, $langcode) { $record = new \stdClass(); foreach ($this->entityInfo['schema_fields_sql']['data_table'] as $name) { - $record->$name = $translation->$name->value; + $key_name = key($entity->$name->offsetGet(0)->getProperties()); + $record->$name = $translation->$name->{$key_name}; } $record->langcode = $langcode; $record->default_langcode = intval($default_langcode == $langcode); diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAdminTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAdminTest.php index 437e0ae..5dc5cd8 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAdminTest.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAdminTest.php @@ -15,7 +15,7 @@ class EntityReferenceAdminTest extends WebTestBase { public static function getInfo() { return array( - 'name' => 'Entity Reference UI', + 'name' => 'Entity reference UI', 'description' => 'Tests for the administrative UI.', 'group' => 'Entity Reference', ); diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php index 7ed83c2..7ea85c6 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php @@ -16,7 +16,7 @@ class EntityReferenceAutoCreateTest extends WebTestBase { public static function getInfo() { return array( - 'name' => 'Entity Reference auto-create', + 'name' => 'Entity reference auto-create', 'description' => 'Tests creating new entity (e.g. taxonomy-term) from an autocomplete widget.', 'group' => 'Entity Reference', ); diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceSelectionAccessTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceSelectionAccessTest.php index 7286b5c..d6c958d 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceSelectionAccessTest.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceSelectionAccessTest.php @@ -16,7 +16,7 @@ class EntityReferenceSelectionAccessTest extends WebTestBase { public static function getInfo() { return array( - 'name' => 'Entity Reference Handlers', + 'name' => 'Entity reference handlers', 'description' => 'Tests for the base handlers provided by Entity Reference.', 'group' => 'Entity Reference', ); @@ -426,7 +426,7 @@ public function testCommentHandler() { ), 'result' => array( 'comment_node_article' => array( - $comments['published_published']->cid => $comment_labels['published_published'], + $comments['published_published']->cid->value => $comment_labels['published_published'], ), ), ), @@ -436,7 +436,7 @@ public function testCommentHandler() { ), 'result' => array( 'comment_node_article' => array( - $comments['published_published']->cid => $comment_labels['published_published'], + $comments['published_published']->cid->value => $comment_labels['published_published'], ), ), ), @@ -465,8 +465,8 @@ public function testCommentHandler() { ), 'result' => array( 'comment_node_article' => array( - $comments['published_published']->cid => $comment_labels['published_published'], - $comments['published_unpublished']->cid => $comment_labels['published_unpublished'], + $comments['published_published']->cid->value => $comment_labels['published_published'], + $comments['published_unpublished']->cid->value => $comment_labels['published_unpublished'], ), ), ), @@ -483,9 +483,9 @@ public function testCommentHandler() { ), 'result' => array( 'comment_node_article' => array( - $comments['published_published']->cid => $comment_labels['published_published'], - $comments['published_unpublished']->cid => $comment_labels['published_unpublished'], - $comments['unpublished_published']->cid => $comment_labels['unpublished_published'], + $comments['published_published']->cid->value => $comment_labels['published_published'], + $comments['published_unpublished']->cid->value => $comment_labels['published_unpublished'], + $comments['unpublished_published']->cid->value => $comment_labels['unpublished_published'], ), ), ), diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceSelectionSortTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceSelectionSortTest.php index 418d85c..fa0a39d 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceSelectionSortTest.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceSelectionSortTest.php @@ -16,7 +16,7 @@ class EntityReferenceSelectionSortTest extends WebTestBase { public static function getInfo() { return array( - 'name' => 'Entity Reference handlers sort', + 'name' => 'Entity reference handlers sort', 'description' => 'Test sorting referenced items.', 'group' => 'Entity Reference', ); diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestMulStorageController.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestMulStorageController.php index 28a90ee..786e91a 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestMulStorageController.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestMulStorageController.php @@ -25,7 +25,7 @@ public function baseFieldDefinitions() { $fields = parent::baseFieldDefinitions(); $fields['default_langcode'] = array( 'label' => t('Default language'), - 'description' => t('Flag to inditcate whether this is the default language.'), + 'description' => t('Flag to indicate whether this is the default language.'), 'type' => 'boolean_field', ); return $fields; diff --git a/core/modules/views/lib/Drupal/views/Plugin/entity_reference/selection/ViewsSelection.php b/core/modules/views/lib/Drupal/views/Plugin/entity_reference/selection/ViewsSelection.php index 511c454..a47529e 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/entity_reference/selection/ViewsSelection.php +++ b/core/modules/views/lib/Drupal/views/Plugin/entity_reference/selection/ViewsSelection.php @@ -137,7 +137,7 @@ protected function initializeView($match = NULL, $match_operator = 'CONTAINS', $ 'limit' => $limit, 'ids' => $ids, ); - $this->view->displayHandlers[$display_name]->setOption('entity_reference_options', $entity_reference_options); + $this->view->displayHandlers->get($display_name)->setOption('entity_reference_options', $entity_reference_options); return TRUE; } diff --git a/core/modules/views/lib/Drupal/views/Tests/EntityReference/SelectionTest.php b/core/modules/views/lib/Drupal/views/Tests/EntityReference/SelectionTest.php index 8e74d44..26e2e82 100644 --- a/core/modules/views/lib/Drupal/views/Tests/EntityReference/SelectionTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/EntityReference/SelectionTest.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\views\Tests\EntityReference\SelectionTest. + * Contains \Drupal\views\Tests\EntityReference\SelectionTest. */ namespace Drupal\views\Tests\EntityReference;