Esempio n. 1
0
 /**
  * {@inheretDoc}
  */
 public function makeReady(TaskCommand $command, InputInterface $input, OutputInterface $output)
 {
     if ($this->value !== null) {
         return;
     }
     $questionHelper = $command->getHelper('question');
     $prompt = array($this->getDescription(), PHP_EOL, $this->getName());
     if ($this->getDefault() !== null) {
         $prompt[] = sprintf(' [%s]', $this->getDefault());
     }
     $prompt[] = ': ';
     $question = new Question(implode('', $prompt), $this->getDefault());
     $this->setValue($questionHelper->ask($input, $output, $question));
 }