->
setDescription('Deletes thumbnails for images whose original file has been deleted.'
) ->
setHelp('The <info>%command.name%</info> deletes unused thumbnails.'
);
} /**
* {@inheritdoc}
*/
protected function execute(InputInterface
$input, OutputInterface
$output) { $io =
new SymfonyStyle($input,
$output);
$this->
removeThumbnails($io);
return 0;
} private function removeThumbnails(SymfonyStyle
$io): void
{ $filesystem =
$this->
getContainer()->
get(MediaServiceInterface::
class)->
getFilesystem();
$thumbnailFiles =
$this->
searchThumbnails($io,
$filesystem);
if (\
count($thumbnailFiles) === 0
) {