Inital commit

This commit is contained in:
2020-11-19 15:36:28 +01:00
parent 71f32f83d3
commit 66ce4ee218
18077 changed files with 2166122 additions and 35184 deletions

View File

@@ -32,8 +32,6 @@ class ClearImageCache extends ContainerAwareCommand
protected function execute(InputInterface $input, OutputInterface $output)
{
$dispatcher = $this->getContainer()->get('event_dispatcher');
$request = new Request();
try {
@@ -41,13 +39,15 @@ class ClearImageCache extends ContainerAwareCommand
$subdir = $input->getArgument('subdir');
if (! is_null($subdir)) $event->setCacheSubdirectory($subdir);
if (! is_null($subdir)) {
$event->setCacheSubdirectory($subdir);
}
$dispatcher->dispatch(TheliaEvents::IMAGE_CLEAR_CACHE, $event);
$this->getDispatcher()->dispatch(TheliaEvents::IMAGE_CLEAR_CACHE, $event);
$output->writeln(sprintf('%s image cache successfully cleared.', is_null($subdir) ? 'Entire' : ucfirst($subdir)));
} catch (\Exception $ex) {
$output->writeln(sprintf("Failed to clear image cache: %s", $ex->getMessage()));
$output->writeln(sprintf("Failed to clear image cache: %s", $ex->getMessage()));
}
}
}