_resourceConfig = $resourceConfig; parent::__construct(); } protected function configure() { $this->setName('wowow:debug')->setDescription('Enabled Template Path Hints.') ->setDefinition([ new InputOption( Options::FOR_HINTS, '-f', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'active le chemin pour le front ou le back', ['storefront'] ),new InputOption( Options::VALUE_HINTS, '-z', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'active ou desactive les chemins', ['1'] )]); } protected function execute(InputInterface $input, OutputInterface $output) { $this->input = $input; $path = $this->input->getOption(Options::FOR_HINTS)[0]; $value = $this->input->getOption(Options::VALUE_HINTS)[0]; $scope = 'default'; $scopeId = 0; $attr = 'dev/debug/template_hints_'.$path; $this->_resourceConfig->saveConfig($attr,$value,$scope,$scopeId); $command = $this->getApplication()->find('cache:clean'); $returnCode = $command->run(new ArrayInput(array('command' => 'cache:clean')),$output); if(!$returnCode) $output->writeln('successfully finished'); } }