Skip to content

Commit b55fcfb

Browse files
[Console] Call command with options without value
1 parent 4f63c92 commit b55fcfb

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)