File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
components/console/helpers Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,24 @@ The user will be asked "Please enter the name of the bundle". She can type
53
53
some name which will be returned by the ``ask `` method. If she leaves it empty,
54
54
the default value (``AcmeDemoBundle `` here) is returned.
55
55
56
+ Autocompletion
57
+ ~~~~~~~~~~~~~~
58
+
59
+ .. versionadded :: 2.2
60
+ Autocompletion for questions was added in Symfony 2.2.
61
+
62
+ You can also specify an array of potential answers for a given question. These
63
+ will be autocompleted as the user types::
64
+
65
+ $dialog = $this->getHelperSet()->get('dialog');
66
+ $bundleNames = array('AcmeDemoBundle', 'AcmeBlogBundle', 'AcmeStoreBundle');
67
+ $name = $dialog->ask(
68
+ $output,
69
+ 'Please enter the name of a bundle',
70
+ 'FooBundle',
71
+ $bundleNames
72
+ );
73
+
56
74
Hiding the User's Response
57
75
~~~~~~~~~~~~~~~~~~~~~~~~~~
58
76
You can’t perform that action at this time.
0 commit comments