We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bd7e39 commit 6533268Copy full SHA for 6533268
components/console/introduction.rst
@@ -312,6 +312,22 @@ convenient for passwords::
312
false
313
);
314
315
+.. versionadded:: 2.2
316
+ Autocompletion for questions was added in Symfony 2.2.
317
+
318
+You can also specify an array of potential answers for a given question. These
319
+will be autocompleted as the user types::
320
321
+ $dialog = $this->getHelperSet()->get('dialog');
322
+ $bundleNames = array('AcmeDemoBundle', 'AcmeBlogBundle', 'AcmeStoreBundle');
323
+ $name = $dialog->ask(
324
+ $output,
325
+ 'Please enter the name of a bundle',
326
+ 'FooBundle',
327
+ $bundleNames
328
+ );
329
330
331
.. caution::
332
333
When you ask for a hidden response, Symfony will use either a binary, change
0 commit comments