Skip to content

Commit dbcd3cd

Browse files
committed
Merge pull request #2139 from tyler-king/2.0
askAndConfirm should return user's input to properly work.
2 parents 49c4ecf + 7bfff13 commit dbcd3cd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/console/helpers/dialoghelper.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ method::
7272
'The name of the bundle should be suffixed with \'Bundle\''
7373
);
7474
}
75+
return $answer;
7576
},
7677
false,
7778
'AcmeDemoBundle'
@@ -89,8 +90,8 @@ This methods has 2 new arguments, the full signature is::
8990

9091
The ``$validator`` is a callback which handles the validation. It should
9192
throw an exception if there is something wrong. The exception message is displayed
92-
in the console, so it is a good practice to put some useful information
93-
in it.
93+
in the console, so it is a good practice to put some useful information in it. The callback
94+
function should also return the value of the user's input if the validation was successful.
9495

9596
You can set the max number of times to ask in the ``$attempts`` argument.
9697
If you reach this max number it will use the default value, which is given

0 commit comments

Comments
 (0)