public function onFileDeleted(EntityDeletedEvent
$event): void
{ $paths =
[];
$activities =
[ ImportExportLogEntity::ACTIVITY_IMPORT,
ImportExportLogEntity::ACTIVITY_DRYRUN,
ImportExportLogEntity::ACTIVITY_EXPORT,
];
foreach ($event->
getIds() as $fileId) { $path = ImportExportFileEntity::
buildPath($fileId);
// since the file could be stored in any one directory of the available activities
foreach ($activities as $activitiy) { $paths[] =
$activitiy . '/' .
$path;
// if file is not of an export there might be a log of invalid records
if ($activitiy !== ImportExportLogEntity::ACTIVITY_EXPORT
) { $paths[] =
$activitiy . '/' .
$path . '_invalid';
} } } $message =
new DeleteFileMessage();