Context
$context,
string
$profileId,
\DateTimeInterface
$expireDate,
?string
$originalFileName = null,
array
$config =
[],
?string
$destinationPath = null,
string
$activity = ImportExportLogEntity::ACTIVITY_EXPORT
): ImportExportLogEntity
{ $profileEntity =
$this->
findProfile($context,
$profileId);
if (!\
in_array($profileEntity->
getType(),
[ImportExportProfileEntity::TYPE_EXPORT, ImportExportProfileEntity::TYPE_IMPORT_EXPORT
], true
)) { throw new ProfileWrongTypeException($profileEntity->
getId(),
$profileEntity->
getType());
} if ($originalFileName === null
) { $originalFileName =
$this->fileService->
generateFilename($profileEntity);
} if ($profileEntity->
getMapping() !== null
) { $mappings = MappingCollection::
fromIterable($profileEntity->
getMapping());
$profileEntity->
setMapping($mappings->
sortByPosition());
}