File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Filter options
components/console/helpers Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Original file line number Diff line number Diff line change @@ -303,8 +303,9 @@ Progress bars define a placeholder called ``message`` to display arbitrary
303
303
messages. However, none of the built-in formats include that placeholder, so
304
304
before displaying these messages, you must define your own custom format::
305
305
306
+ ProgressBar::setFormatDefinition('custom', ' %current%/%max% -- %message%');
307
+
306
308
$progressBar = new ProgressBar($output, 100);
307
- $progressBar->setFormatDefinition('custom', ' %current%/%max% -- %message%');
308
309
$progressBar->setFormat('custom');
309
310
310
311
Now, use the ``setMessage() `` method to set the value of the ``%message% ``
@@ -322,8 +323,9 @@ placeholder before displaying the progress bar::
322
323
Messages can be combined with custom placeholders too. In this example, the
323
324
progress bar uses the ``%message% `` and ``%filename% `` placeholders::
324
325
326
+ ProgressBar::setFormatDefinition('custom', ' %current%/%max% -- %message% (%filename%)');
327
+
325
328
$progressBar = new ProgressBar($output, 100);
326
- $progressBar->setFormatDefinition('custom', ' %current%/%max% -- %message% (%filename%)');
327
329
$progressBar->setFormat('custom');
328
330
329
331
The ``setMessage() `` method accepts a second optional argument to set the value
You can’t perform that action at this time.
0 commit comments