Skip to content

Commit ca0c86c

Browse files
committed
minor #8352 Update command in controller (zairigimad, javiereguiluz)
This PR was submitted for the 3.3 branch but it was merged into the 2.7 branch instead (closes #8352). Discussion ---------- Update command in controller Add example of passing argument beside option to console command from contoller Commits ------- cf94f9a reowrd e2caa7f Update command in controller
2 parents e7fbb60 + cf94f9a commit ca0c86c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

console/command_in_controller.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ Run this command from inside your controller via::
4343

4444
$input = new ArrayInput(array(
4545
'command' => 'swiftmailer:spool:send',
46+
// (optional) define the value of command arguments
47+
'fooArgument' => 'barValue',
48+
// (optional) pass options to the command
4649
'--message-limit' => $messages,
4750
));
51+
4852
// You can use NullOutput() if you don't need the output
4953
$output = new BufferedOutput();
5054
$application->run($input, $output);

0 commit comments

Comments
 (0)