$this->
addCloneAssociations($reference,
$nested,
$cloneChildren);
} } private function translationHasParent(VersionCommitEntity
$commit, VersionCommitDataEntity
$translationData): bool
{ /** @var EntityTranslationDefinition $translationDefinition */
$translationDefinition =
$this->registry->
getByEntityName($translationData->
getEntityName());
$parentEntity =
$translationDefinition->
getParentDefinition()->
getEntityName();
$parentPropertyName =
$this->
getEntityForeignKeyName($parentEntity);
/** @var array<string, string> $payload */
$payload =
$translationData->
getPayload();
$parentId =
$payload[$parentPropertyName];
foreach ($commit->
getData() as $data) { if ($data->
getEntityName() !==
$parentEntity) { continue;
} $primary =
$data->
getEntityId();