protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) | ||
$input | Symfony\Component\Console\Input\InputInterface | |
$output | Symfony\Component\Console\Output\OutputInterface |
public function execute(InputInterface $input, OutputInterface $output) { $memory = '1024'; if ($input->getOption("memory_limit")) { $memory = $input->getOption("memory_limit"); } ini_set("memory_limit", $memory . "M"); parent::execute($input, $output); $container = $this->getContainer(); $cacheDir = $container->getParameter('kernel.cache_dir'); $chmod = $container->getParameter('skillberto_console_extend.chmod'); /** @var Filesystem $fs */ $fs = $container->get('filesystem'); $fs->chmod($cacheDir, $chmod, 00, true); }
/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $nullOutput = new NullOutput(); $io = new SymfonyStyle($input, $output); /** @var KernelInterface $kernel */ $kernel = $this->getContainer()->get('kernel'); $context = $this->getContainer()->getParameter('sulu.context'); $io->comment(sprintf('Clearing the <info>%s cache</info> for the <info>%s</info> environment with debug <info>%s</info>', $context, $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); parent::execute($input, $nullOutput); $io->success(sprintf('%s cache for the "%s" environment (debug=%s) was successfully cleared.', ucfirst($context), $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); if (SuluKernel::CONTEXT_ADMIN === $context) { /** @var KernelFactoryInterface $kernelFactory */ $kernelFactory = $this->getContainer()->get('sulu_preview.preview.kernel_factory'); $previewKernel = $kernelFactory->create($kernel->getEnvironment()); // set preview container $this->setContainer($previewKernel->getContainer()); $io->comment(sprintf('Clearing the <info>preview cache</info> for the <info>%s</info> environment with debug <info>%s</info>', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); parent::execute($input, $nullOutput); $io->success(sprintf('Preview cache for the "%s" environment (debug=%s) was successfully cleared.', $kernel->getEnvironment(), var_export($kernel->isDebug(), true))); } }
protected function execute(InputInterface $input, OutputInterface $output) { parent::execute($input, $output); $this->saveParameterAssets(); }