protected function Profile::save in Commerce Migrate 3.0.x
Same name and namespace in other branches
- 8.2 src/Plugin/migrate/destination/Profile.php \Drupal\commerce_migrate\Plugin\migrate\destination\Profile::save()
- 3.1.x src/Plugin/migrate/destination/Profile.php \Drupal\commerce_migrate\Plugin\migrate\destination\Profile::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
- src/
Plugin/ migrate/ destination/ Profile.php, line 27
Class
- Profile
- Saves a profile entity.
Namespace
Drupal\commerce_migrate\Plugin\migrate\destinationCode
protected function save(ContentEntityInterface $entity, array $old_destination_id_values = []) {
$entity
->save();
return [
$this
->getKey('id') => $entity
->id(),
$this
->getKey('revision') => $entity
->getRevisionId(),
];
}