Skip to content

Commit 00ac4ce

Browse files
committed
minor #18403 [Console] Call command with options without value (alexandre-daubois)
This PR was merged into the 5.4 branch. Discussion ---------- [Console] Call command with options without value Also added `:class:` to `BufferedOutput`, as it's not referenced anywhere else in the page Commits ------- b55fcfb [Console] Call command with options without value
2 parents efa8a5f + b55fcfb commit 00ac4ce

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

console/command_in_controller.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ Imagine you want to run the ``debug:twig`` from inside your controller::
4242
'fooArgument' => 'barValue',
4343
// (optional) pass options to the command
4444
'--bar' => 'fooValue',
45+
// (optional) pass options without value
46+
'--baz' => true,
4547
]);
4648

4749
// You can use NullOutput() if you don't need the output
@@ -59,9 +61,10 @@ Imagine you want to run the ``debug:twig`` from inside your controller::
5961
Showing Colorized Command Output
6062
--------------------------------
6163

62-
By telling the ``BufferedOutput`` it is decorated via the second parameter,
63-
it will return the Ansi color-coded content. The `SensioLabs AnsiToHtml converter`_
64-
can be used to convert this to colorful HTML.
64+
By telling the :class:`Symfony\\Component\\Console\\Output\\BufferedOutput`
65+
it is decorated via the second parameter, it will return the Ansi color-coded
66+
content. The `SensioLabs AnsiToHtml converter`_ can be used to convert this to
67+
colorful HTML.
6568

6669
First, require the package:
6770

0 commit comments

Comments
 (0)