@@ -9,7 +9,7 @@ functions to ask the user for more information. It is included in the default
9
9
helper set, which you can get by calling
10
10
:method: `Symfony\\ Component\\ Console\\ Command\\ Command::getHelperSet `::
11
11
12
- $dialog = $this->getHelperSet()->get ('dialog');
12
+ $dialog = $this->getHelper ('dialog');
13
13
14
14
All the methods inside the Dialog Helper have an
15
15
:class: `Symfony\\ Component\\ Console\\ Output\\ OutputInterface ` as the first
@@ -65,7 +65,7 @@ Autocompletion
65
65
You can also specify an array of potential answers for a given question. These
66
66
will be autocompleted as the user types::
67
67
68
- $dialog = $this->getHelperSet()->get ('dialog');
68
+ $dialog = $this->getHelper ('dialog');
69
69
$bundleNames = array('AcmeDemoBundle', 'AcmeBlogBundle', 'AcmeStoreBundle');
70
70
$name = $dialog->ask(
71
71
$output,
@@ -83,7 +83,7 @@ Hiding the User's Response
83
83
You can also ask a question and hide the response. This is particularly
84
84
convenient for passwords::
85
85
86
- $dialog = $this->getHelperSet()->get ('dialog');
86
+ $dialog = $this->getHelper ('dialog');
87
87
$password = $dialog->askHiddenResponse(
88
88
$output,
89
89
'What is the database password?',
@@ -154,7 +154,7 @@ Validating a Hidden Response
154
154
155
155
You can also ask and validate a hidden response::
156
156
157
- $dialog = $this->getHelperSet()->get ('dialog');
157
+ $dialog = $this->getHelper ('dialog');
158
158
159
159
$validator = function ($value) {
160
160
if ('' === trim($value)) {
@@ -192,7 +192,7 @@ Instead, you can use the
192
192
method, which makes sure that the user can only enter a valid string
193
193
from a predefined list::
194
194
195
- $dialog = $this->getHelperSet()->get ('dialog');
195
+ $dialog = $this->getHelper ('dialog');
196
196
$colors = array('red', 'blue', 'yellow');
197
197
198
198
$color = $dialog->select(
0 commit comments