diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php index bb6a493..f6224d6 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php @@ -123,10 +123,10 @@ public function isTranslationDestination() { */ public function getIds() { $ids = []; - $this->addEntityKey($ids, 'id'); + $this->addDestinationId($ids, 'id'); if ($this->isTranslationDestination()) { - $this->addEntityKey($ids, 'langcode', new MigrateException('This entity type does not support translation.')); + $this->addDestinationId($ids, 'langcode', new MigrateException('This entity type does not support translation.')); } return $ids; @@ -147,7 +147,7 @@ public function getIds() { * @throws \Exception * If the current entity type does have the specified $key. */ - protected function addEntityKey(array &$ids, $key, \Exception $error = NULL) { + protected function addDestinationId(array &$ids, $key, \Exception $error = NULL) { $key = $this->getKey($key); if ($key) { $ids[$key] = $this->getDefinitionFromEntity($key); diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php index f895165..9ae4583 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php @@ -90,10 +90,10 @@ protected function save(ContentEntityInterface $entity, array $old_destination_i */ public function getIds() { $ids = []; - $this->addEntityKey($ids, 'revision', new MigrateException('This entity type does not support revisions.')); + $this->addDestinationId($ids, 'revision', new MigrateException('This entity type does not support revisions.')); if ($this->isTranslationDestination()) { - $this->addEntityKey($ids, 'langcode', new MigrateException('This entity type does not support translation.')); + $this->addDestinationId($ids, 'langcode', new MigrateException('This entity type does not support translation.')); } return $ids; diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php index cc4becc..660cae1 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php @@ -114,7 +114,8 @@ public function testRevisionTranslation() { $this->assertSame($node->getRevisionId(), $source_ids['vid']); $this->assertSame('fr', $source_ids['langcode']); - // Confirm the french revision was written, instead of the default revision. + // Confirm the french revision was used in the migration, instead of the + // default revision. /** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */ $entity_type_manager = \Drupal::entityTypeManager(); $revision = $entity_type_manager->getStorage('node')->loadRevision(1);