protected function EntityContentComplete::updateEntity in Drupal 9
Same name and namespace in other branches
- 8 core/modules/migrate/src/Plugin/migrate/destination/EntityContentComplete.php \Drupal\migrate\Plugin\migrate\destination\EntityContentComplete::updateEntity()
 
Updates an entity with the new values from row.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to update.
\Drupal\migrate\Row $row: The row object to update from.
Return value
\Drupal\Core\Entity\EntityInterface An updated entity from row values.
Overrides EntityContentBase::updateEntity
1 call to EntityContentComplete::updateEntity()
- EntityContentComplete::getEntity in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentComplete.php  - Gets the entity.
 
File
- core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentComplete.php, line 112  
Class
- EntityContentComplete
 - Provides a destination for migrating the entire entity revision table.
 
Namespace
Drupal\migrate\Plugin\migrate\destinationCode
protected function updateEntity(EntityInterface $entity, Row $row) {
  $entity = parent::updateEntity($entity, $row);
  // Always set the rollback action to delete. This is because the parent
  // updateEntity will set the rollback action to preserve for the original
  // language row, which is needed for the classic node migrations.
  $this
    ->setRollbackAction($row
    ->getIdMap(), MigrateIdMapInterface::ROLLBACK_DELETE);
  return $entity;
}