// Stubs might need some required fields filled in.
if ($row->
isStub()) { $this->
processStubRow($row);
} $entity =
$this->storage->
create($row->
getDestination());
$entity->
enforceIsNew();
} // We need to update the entity, so that the destination row IDs are
// correct.
$entity =
$this->
updateEntity($entity,
$row);
$entity->
isDefaultRevision(TRUE
);
if ($entity instanceof EntityChangedInterface &&
$entity instanceof ContentEntityInterface
) { // If we updated any untranslatable fields, update the timestamp for the
// other translations.
/** @var \Drupal\Core\Entity\ContentEntityInterface|\Drupal\Core\Entity\EntityChangedInterface $entity */
foreach ($entity->
getTranslationLanguages() as $langcode =>
$language) { // If we updated an untranslated field, then set the changed time for
// for all translations to match the current row that we are saving.
// In this context, getChangedTime() should return the value we just
// set in the updateEntity() call above.
if ($entity->
getTranslation($langcode)->
hasTranslationChanges()) {