You are here

protected function EntityRevision::save in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\destination\EntityRevision::save()
  2. 8 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.0 core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php \Drupal\migrate\Plugin\migrate\destination\EntityRevision::save()

Save the entity.

Parameters

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

array $old_destination_id_values: An array of destination id values.

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 69
Contains \Drupal\migrate\Plugin\migrate\destination\EntityRevision.

Class

EntityRevision
Plugin annotation @MigrateDestination( id = "entity_revision", deriver = "Drupal\migrate\Plugin\Derivative\MigrateEntityRevision" )

Namespace

Drupal\migrate\Plugin\migrate\destination

Code

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