|
@@ -28,9 +28,9 @@ discard block |
|
|
block discarded – undo |
|
28
|
28
|
*/ |
|
29
|
29
|
protected function configure() |
|
30
|
30
|
{ |
|
31
|
|
- $this->setName( 'aimeos:cache' ); |
|
32
|
|
- $this->setDescription( 'Clears the content cache' ); |
|
33
|
|
- $this->addArgument( 'site', InputArgument::OPTIONAL, 'Site codes to clear the cache like "default unittest" (none for all)' ); |
|
|
31
|
+ $this->setName('aimeos:cache'); |
|
|
32
|
+ $this->setDescription('Clears the content cache'); |
|
|
33
|
+ $this->addArgument('site', InputArgument::OPTIONAL, 'Site codes to clear the cache like "default unittest" (none for all)'); |
|
34
|
34
|
} |
|
35
|
35
|
|
|
36
|
36
|
|
|
@@ -40,26 +40,26 @@ discard block |
|
|
block discarded – undo |
|
40
|
40
|
* @param InputInterface $input Input object |
|
41
|
41
|
* @param OutputInterface $output Output object |
|
42
|
42
|
*/ |
|
43
|
|
- protected function execute( InputInterface $input, OutputInterface $output ) |
|
|
43
|
+ protected function execute(InputInterface $input, OutputInterface $output) |
|
44
|
44
|
{ |
|
45
|
|
- $context = $this->getContainer()->get( 'aimeos_context' )->get( false, 'command' ); |
|
46
|
|
- $context->setEditor( 'aimeos:cache' ); |
|
|
45
|
+ $context = $this->getContainer()->get('aimeos_context')->get(false, 'command'); |
|
|
46
|
+ $context->setEditor('aimeos:cache'); |
|
47
|
47
|
|
|
48
|
|
- $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context ); |
|
|
48
|
+ $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context); |
|
49
|
49
|
|
|
50
|
|
- foreach( $this->getSiteItems( $context, $input ) as $siteItem ) |
|
|
50
|
+ foreach ($this->getSiteItems($context, $input) as $siteItem) |
|
51
|
51
|
{ |
|
52
|
|
- $localeItem = $localeManager->bootstrap( $siteItem->getCode(), '', '', false ); |
|
|
52
|
+ $localeItem = $localeManager->bootstrap($siteItem->getCode(), '', '', false); |
|
53
|
53
|
|
|
54
|
54
|
$lcontext = clone $context; |
|
55
|
|
- $lcontext->setLocale( $localeItem ); |
|
|
55
|
+ $lcontext->setLocale($localeItem); |
|
56
|
56
|
|
|
57
|
|
- $cache = new \Aimeos\MAdmin\Cache\Proxy\Standard( $lcontext ); |
|
58
|
|
- $lcontext->setCache( $cache ); |
|
|
57
|
+ $cache = new \Aimeos\MAdmin\Cache\Proxy\Standard($lcontext); |
|
|
58
|
+ $lcontext->setCache($cache); |
|
59
|
59
|
|
|
60
|
|
- $output->writeln( sprintf( 'Clearing the Aimeos cache for site <info>%1$s</info>', $siteItem->getCode() ) ); |
|
|
60
|
+ $output->writeln(sprintf('Clearing the Aimeos cache for site <info>%1$s</info>', $siteItem->getCode())); |
|
61
|
61
|
|
|
62
|
|
- \Aimeos\MAdmin\Cache\Manager\Factory::createManager( $lcontext )->getCache()->clear(); |
|
|
62
|
+ \Aimeos\MAdmin\Cache\Manager\Factory::createManager($lcontext)->getCache()->clear(); |
|
63
|
63
|
} |
|
64
|
64
|
} |
|
65
|
65
|
} |