/** * {@inheritDoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $template = $input->getArgument('template'); $directory = $input->getOption('directory'); $file = $input->getOption('filename'); $filePath = $this->initializer->initialize($template, $directory, $file); $output->writeln(sprintf('<comment>Successfully create deployer configuration: <info>%s</info></comment>', $filePath)); }
/** * {@inheritDoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $template = $input->getArgument('template'); $directory = $input->getOption('directory'); $file = $input->getOption('filename'); if ($template === null) { $helper = $this->getHelper('question'); $question = new ChoiceQuestion('Please select your project type (defaults to common):', $this->availableTemplates, 0); $question->setErrorMessage('Color %s is invalid.'); $template = $helper->ask($input, $output, $question); } $filePath = $this->initializer->initialize($template, $directory, $file); $output->writeln(sprintf('<comment>Successfully create deployer configuration: <info>%s</info></comment>', $filePath)); }