You are here

protected function EntityContentComplete::save in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Plugin/migrate/destination/EntityContentComplete.php \Drupal\migrate\Plugin\migrate\destination\EntityContentComplete::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

File

core/modules/migrate/src/Plugin/migrate/destination/EntityContentComplete.php, line 124

Class

EntityContentComplete
Provides a destination for migrating the entire entity revision table.

Namespace

Drupal\migrate\Plugin\migrate\destination

Code

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