Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e9c7a2e

Browse filesBrowse files
committed
Fix static method call
1 parent e973497 commit e9c7a2e
Copy full SHA for e9c7a2e

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed

‎components/console/helpers/progressbar.rst

Copy file name to clipboardExpand all lines: components/console/helpers/progressbar.rst
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,9 @@ Progress bars define a placeholder called ``message`` to display arbitrary
303303
messages. However, none of the built-in formats include that placeholder, so
304304
before displaying these messages, you must define your own custom format::
305305

306+
ProgressBar::setFormatDefinition('custom', ' %current%/%max% -- %message%');
307+
306308
$progressBar = new ProgressBar($output, 100);
307-
$progressBar->setFormatDefinition('custom', ' %current%/%max% -- %message%');
308309
$progressBar->setFormat('custom');
309310

310311
Now, use the ``setMessage()`` method to set the value of the ``%message%``
@@ -322,8 +323,9 @@ placeholder before displaying the progress bar::
322323
Messages can be combined with custom placeholders too. In this example, the
323324
progress bar uses the ``%message%`` and ``%filename%`` placeholders::
324325

326+
ProgressBar::setFormatDefinition('custom', ' %current%/%max% -- %message% (%filename%)');
327+
325328
$progressBar = new ProgressBar($output, 100);
326-
$progressBar->setFormatDefinition('custom', ' %current%/%max% -- %message% (%filename%)');
327329
$progressBar->setFormat('custom');
328330

329331
The ``setMessage()`` method accepts a second optional argument to set the value

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.