From 163f6d5be04cb20625ec1717eb0cc0f496aabc8d Mon Sep 17 00:00:00 2001 From: Tyler King Date: Tue, 15 Jan 2013 10:50:19 -0330 Subject: [PATCH 1/2] askAndConfirm should return user's input to properly work. --- components/console/helpers/dialoghelper.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/console/helpers/dialoghelper.rst b/components/console/helpers/dialoghelper.rst index 7ce549899c6..e681fda9aac 100644 --- a/components/console/helpers/dialoghelper.rst +++ b/components/console/helpers/dialoghelper.rst @@ -72,6 +72,7 @@ method:: 'The name of the bundle should be suffixed with \'Bundle\'' ); } + return $answer; }, false, 'AcmeDemoBundle' @@ -89,8 +90,8 @@ This methods has 2 new arguments, the full signature is:: The ``$validator`` is a callback which handles the validation. It should throw an exception if there is something wrong. The exception message is displayed -in the console, so it is a good practice to put some useful information -in it. +in the console, so it is a good practice to put some useful information in it. The callback +function should also return the value of the user's input if the validatation was successfull. You can set the max number of times to ask in the ``$attempts`` argument. If you reach this max number it will use the default value, which is given From 7bfff13b36471fd4272b9a45c99bd7a6c23a9234 Mon Sep 17 00:00:00 2001 From: Tyler King Date: Tue, 15 Jan 2013 14:13:55 -0330 Subject: [PATCH 2/2] Fixed typos --- components/console/helpers/dialoghelper.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/console/helpers/dialoghelper.rst b/components/console/helpers/dialoghelper.rst index e681fda9aac..70a0bcd60d1 100644 --- a/components/console/helpers/dialoghelper.rst +++ b/components/console/helpers/dialoghelper.rst @@ -91,7 +91,7 @@ This methods has 2 new arguments, the full signature is:: The ``$validator`` is a callback which handles the validation. It should throw an exception if there is something wrong. The exception message is displayed in the console, so it is a good practice to put some useful information in it. The callback -function should also return the value of the user's input if the validatation was successfull. +function should also return the value of the user's input if the validation was successful. You can set the max number of times to ask in the ``$attempts`` argument. If you reach this max number it will use the default value, which is given