You are here

protected function EntityRevision::save in Drupal 9

Same name in this branch
  1. 9 core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\destination\EntityRevision::save()
  2. 9 core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php \Drupal\migrate\Plugin\migrate\destination\EntityRevision::save()
Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php \Drupal\migrate\Plugin\migrate\destination\EntityRevision::save()

Saves the entity.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The content entity.

array $old_destination_id_values: (optional) An array of destination ID values. Defaults to an empty array.

Return value

array An array containing the entity ID.

Overrides EntityContentBase::save

1 call to EntityRevision::save()
EntityRevision::save in core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php
Allow public access for testing.
1 method overrides EntityRevision::save()
EntityRevision::save in core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php
Allow public access for testing.

File

core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php, line 165

Class

EntityRevision
Provides entity revision destination plugin.

Namespace

Drupal\migrate\Plugin\migrate\destination

Code

protected function save(ContentEntityInterface $entity, array $old_destination_id_values = []) {
  $entity
    ->save();
  return [
    $entity
      ->getRevisionId(),
  ];
}