From e9c7a2e2e54295509c7348a20224d519cb53c4ec Mon Sep 17 00:00:00 2001 From: Patrik Csak Date: Sat, 24 Feb 2018 16:06:32 -0800 Subject: [PATCH] Fix static method call --- components/console/helpers/progressbar.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/console/helpers/progressbar.rst b/components/console/helpers/progressbar.rst index 1a9726b1af0..c8765dbcf24 100644 --- a/components/console/helpers/progressbar.rst +++ b/components/console/helpers/progressbar.rst @@ -303,8 +303,9 @@ Progress bars define a placeholder called ``message`` to display arbitrary messages. However, none of the built-in formats include that placeholder, so before displaying these messages, you must define your own custom format:: + ProgressBar::setFormatDefinition('custom', ' %current%/%max% -- %message%'); + $progressBar = new ProgressBar($output, 100); - $progressBar->setFormatDefinition('custom', ' %current%/%max% -- %message%'); $progressBar->setFormat('custom'); Now, use the ``setMessage()`` method to set the value of the ``%message%`` @@ -322,8 +323,9 @@ placeholder before displaying the progress bar:: Messages can be combined with custom placeholders too. In this example, the progress bar uses the ``%message%`` and ``%filename%`` placeholders:: + ProgressBar::setFormatDefinition('custom', ' %current%/%max% -- %message% (%filename%)'); + $progressBar = new ProgressBar($output, 100); - $progressBar->setFormatDefinition('custom', ' %current%/%max% -- %message% (%filename%)'); $progressBar->setFormat('custom'); The ``setMessage()`` method accepts a second optional argument to set the value