8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our doc 8000 umentation.
There was an error while loading. Please reload this page.
1 parent 2d29c07 commit c1fc868Copy full SHA for c1fc868
console/request_context.rst
@@ -72,11 +72,13 @@ from the ``router`` service and override its settings::
72
{
73
protected function execute(InputInterface $input, OutputInterface $output)
74
75
- $context = $this->getContainer()->get('router')->getContext();
+ $router = $this->getContainer()->get('router');
76
+ $context = $router->getContext();
77
$context->setHost('example.com');
78
$context->setScheme('https');
79
$context->setBaseUrl('my/path');
80
- // ... your code here
81
+ $url = $router->generate('route-name', array('param-name' => 'param-value'));
82
+ // ...
83
}
84
0 commit comments