function EntityContentBase::save
Same name in other branches
- 9 core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php \Drupal\migrate\Plugin\migrate\destination\EntityContentBase::save()
- 8.9.x core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php \Drupal\migrate\Plugin\migrate\destination\EntityContentBase::save()
- 10 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 235
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->setSyncing(TRUE);
$entity->save();
return [
$entity->id(),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.