protected function EntityReferenceRevisions::save in Entity Reference Revisions 8
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 EntityRevision::save
File
- src/
Plugin/ migrate/ destination/ EntityReferenceRevisions.php, line 66
Class
- EntityReferenceRevisions
- Provides entity_reference_revisions destination plugin.
Namespace
Drupal\entity_reference_revisions\Plugin\migrate\destinationCode
protected function save(ContentEntityInterface $entity, array $oldDestinationIdValues = []) {
$entity
->save();
return [
$this
->getKey('id') => $entity
->id(),
$this
->getKey('revision') => $entity
->getRevisionId(),
];
}