Liip\RMT\Output\Output::setDialogHelper PHP Method

setDialogHelper() public method

public setDialogHelper ( $dh )
    public function setDialogHelper($dh)
    {
        $this->dialogHelper = $dh;
    }

Usage Example

Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function run(InputInterface $input, OutputInterface $output)
 {
     // Store the input and output for easier usage
     $this->input = $input;
     if (!$output instanceof Output) {
         throw new \InvalidArgumentException('Not the expected output type');
     }
     $this->output = $output;
     $dialogHelper = class_exists('Symfony\\Component\\Console\\Helper\\QuestionHelper') ? $this->getHelperSet()->get('question') : $this->getHelperSet()->get('dialog');
     $this->output->setDialogHelper($dialogHelper);
     $this->output->setFormatterHelper($this->getHelperSet()->get('formatter'));
     Context::getInstance()->setService('input', $this->input);
     Context::getInstance()->setService('output', $this->output);
     parent::run($input, $output);
 }