10 use Symfony\Component\Console\Input\InputArgument;
11 use Symfony\Component\Console\Input\InputInterface;
12 use Symfony\Component\Console\Input\InputOption;
13 use Symfony\Component\Console\Output\OutputInterface;
40 $this->objectManager = $objectManagerProvider->
get();
41 parent::__construct();
50 self::INPUT_KEY_MODULES,
51 InputArgument::IS_ARRAY | ($this->
isModuleRequired() ? InputArgument::REQUIRED : InputArgument::OPTIONAL),
55 self::INPUT_KEY_CLEAR_STATIC_CONTENT,
57 InputOption::VALUE_NONE,
58 'Clear generated static view files. Necessary, if the module(s) have static view files' 78 protected function cleanup(InputInterface $input, OutputInterface
$output)
83 $output->writeln(
'<info>Cache cleared successfully.</info>');
85 $cleanupFiles = $this->objectManager->get(\
Magento\Framework\
App\
State\CleanupFiles::class);
86 $cleanupFiles->clearCodeGeneratedClasses();
88 "<info>Generated classes cleared successfully. Please run the 'setup:di:compile' command to " 89 .
'generate classes.</info>' 91 if ($input->getOption(self::INPUT_KEY_CLEAR_STATIC_CONTENT)) {
92 $cleanupFiles->clearMaterializedViewFiles();
93 $output->writeln(
'<info>Generated static view files cleared successfully.</info>');
96 "<info>Info: Some modules might require static view files to be cleared. To do this, run '" 97 . $this->getName() .
"' with the --" . self::INPUT_KEY_CLEAR_STATIC_CONTENT
98 .
' option to clear them.</info>'
cleanup($repo, $mainline)
__construct(ObjectManagerProvider $objectManagerProvider)
const INPUT_KEY_CLEAR_STATIC_CONTENT