From ac3df5725ac4e8b775992ed7777ca4b75dba978a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A4rtel?= Date: Fri, 17 May 2013 16:15:11 +0300 Subject: [PATCH] Documented ProgressHelper's clear() method. --- components/console/helpers/progresshelper.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/console/helpers/progresshelper.rst b/components/console/helpers/progresshelper.rst index cadf41d947d..1c3635e93c6 100644 --- a/components/console/helpers/progresshelper.rst +++ b/components/console/helpers/progresshelper.rst @@ -10,6 +10,9 @@ Progress Helper .. versionadded:: 2.3 The ``setCurrent`` method was added in Symfony 2.3. +.. versionadded:: 2.4 + The ``clear`` method was added in Symfony 2.4. + When executing longer-running commands, it may be helpful to show progress information, which updates as your command runs: @@ -37,6 +40,12 @@ pass it a total number of units, and advance the progress as your command execut :method:`Symfony\\Component\\Console\\Helper\\ProgressHelper::setCurrent` method. +If you want to output something while the progress bar is running, +call :method:`Symfony\\Component\\Console\\Helper\\ProgressHelper::clear` first. +After you're done, call +:method:`Symfony\\Component\\Console\\Helper\\ProgressHelper::display` +to show the progress bar again. + The appearance of the progress output can be customized as well, with a number of different levels of verbosity. Each of these displays different possible items - like percentage completion, a moving progress bar, or current/total