protected function configure() { $this->setName('config:set')->setDescription('Set configuration value'); foreach ($this->config->getParameters() as $key) { $this->addOption($key, NULL, InputOption::VALUE_REQUIRED, $this->config->getDescription($key)); } }
protected function configure() { $this->setName('config:reset')->setDescription('Reset a configuration value')->addOption('all', 'a', InputOption::VALUE_NONE, 'Reset all listed parameters'); foreach ($this->config->getParameters() as $key) { $this->addOption($key, NULL, InputOption::VALUE_NONE, $this->config->getDescription($key)); } }
protected function configure() { $this->setName('config:set')->setDescription('Set configuration value'); foreach ($this->config->getParameters() as $key) { $this->addOption($key, NULL, InputOption::VALUE_REQUIRED, $this->config->getDescription($key)); } // Deprecated options. $this->addOption('mysql_type', NULL, InputOption::VALUE_REQUIRED, 'Deprecated. See db_type.'); }
public function __construct(ContainerInterface $container, ConfigRepository $config, $parameter) { $this->container = $container; $this->config = $config; $this->parameter = $parameter; if ($config && $parameter) { $this->description = $this->config->getDescription($parameter); $this->example = $this->config->getExample($parameter); } }
protected function execute(InputInterface $input, OutputInterface $output) { $rows = array(); foreach ($this->config->getParameters() as $key) { $rows[] = array($key, $this->getContainer()->getParameter($key), $this->config->getDescription($key)); } $table = $this->getApplication()->getHelperSet()->get('table'); $table->setHeaders(array('Key', 'Value', 'Description')); $table->setRows($rows); $table->render($output); }