protected function EntityContentBase::save in Drupal 9
Same name and namespace in other branches
- 8 core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php \Drupal\migrate\Plugin\migrate\destination\EntityContentBase::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.
3 calls to EntityContentBase::save()
- EntityContentBase::import in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentBase.php - EntityContentComplete::save in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentComplete.php - Saves the entity.
- EntityUser::save in core/
modules/ user/ src/ Plugin/ migrate/ destination/ EntityUser.php - Saves the entity.
3 methods override EntityContentBase::save()
- EntityContentComplete::save in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentComplete.php - Saves the entity.
- EntityRevision::save in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityRevision.php - Saves the entity.
- EntityUser::save in core/
modules/ user/ src/ Plugin/ migrate/ destination/ EntityUser.php - Saves the entity.
File
- core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentBase.php, line 206
Class
- EntityContentBase
- Provides destination class for all content entities lacking a specific class.
Namespace
Drupal\migrate\Plugin\migrate\destinationCode
protected function save(ContentEntityInterface $entity, array $old_destination_id_values = []) {
$entity
->save();
return [
$entity
->id(),
];
}