@@ -12,7 +12,7 @@ functions to ask the user for more information. It is included in the default
12
12
helper set, which you can get by calling
13
13
:method: `Symfony\\ Component\\ Console\\ Command\\ Command::getHelperSet `::
14
14
15
- $helper = $this->getHelperSet()->get ('question');
15
+ $helper = $this->getHelper ('question');
16
16
17
17
The Question Helper has a single method
18
18
:method: `Symfony\\ Component\\ Console\\ Command\\ Command::ask ` that needs an
@@ -30,7 +30,7 @@ the following to your command::
30
30
use Symfony\Component\Console\Question\ConfirmationQuestion;
31
31
// ...
32
32
33
- $helper = $this->getHelperSet()->get ('question');
33
+ $helper = $this->getHelper ('question');
34
34
$question = new ConfirmationQuestion('Continue with this action?', false);
35
35
36
36
if (!$helper->ask($input, $output, $question)) {
@@ -73,7 +73,7 @@ from a predefined list::
73
73
use Symfony\Component\Console\Question\ChoiceQuestion;
74
74
// ...
75
75
76
- $helper = $app->getHelperSet()->get ('question');
76
+ $helper = $this->getHelper ('question');
77
77
$question = new ChoiceQuestion(
78
78
'Please select your favorite color (defaults to red)',
79
79
array('red', 'blue', 'yellow'),
@@ -107,7 +107,7 @@ this use :method:`Symfony\\Component\\Console\\Question\\ChoiceQuestion::setMult
107
107
use Symfony\Component\Console\Question\ChoiceQuestion;
108
108
// ...
109
109
110
- $helper = $app->getHelperSet()->get ('question');
110
+ $helper = $this->getHelper ('question');
111
111
$question = new ChoiceQuestion(
112
112
'Please select your favorite color (defaults to red)',
113
113
array('red', 'blue', 'yellow'),
@@ -206,7 +206,7 @@ You can also use a validator with a hidden question::
206
206
use Symfony\Component\Console\Question\Question;
207
207
// ...
208
208
209
- $helper = $this->getHelperSet()->get ('question');
209
+ $helper = $this->getHelper ('question');
210
210
211
211
$question = new Question('Please enter your password');
212
212
$question->setValidator(function ($value) {
0 commit comments