$previous_untranslatable_field_value =
$this->previousUntranslatableFieldValue
[$previous_untranslatable_field_langcode];
} // Check that after instantiating a new revision for the specified
// translation, we are resuming work from where we left the last time. If
// that is the case, the label generated for the previous revision should
// match the stored one.
if (!
$entity->
isNew()) { $previous_label = NULL;
if (!
$entity->
isNewTranslation()) { $previous_label =
$this->
generateNewEntityLabel($entity,
$previous_revision_id);
$latest_affected_revision_id =
$this->storage->
getLatestTranslationAffectedRevisionId($entity->
id(),
$entity->
language()->
getId());
} else { // Normally it would make sense to load the default revision in this
// case, however that would mean simulating here the logic that we need
// to test, thus "masking" possible flaws. To avoid that, we simply
// pretend we are starting from an earlier non translated revision.
// This ensures that the we can check that the merging logic is applied
// also when adding a new translation.
$latest_affected_revision_id = 1;
} $previous_revision_id =
(int) $entity->
getLoadedRevisionId();