Skip to content

Commit c557dac

Browse files
committed
minor #11587 Added some missing info in the article about container params in routes (javiereguiluz)
This PR was merged into the 3.4 branch. Discussion ---------- Added some missing info in the article about container params in routes Fixes #11581. Commits ------- 8fac2e6 Added some missing info in the article about container params in routes
2 parents 620dba6 + 8fac2e6 commit c557dac

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

routing/service_container_parameters.rst

+30
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,36 @@ path):
164164
165165
return $routes;
166166
167+
Now make sure that the ``app.route_prefix`` parameter is set somewhere in your
168+
container:
169+
170+
.. configuration-block::
171+
172+
.. code-block:: yaml
173+
174+
# app/config/config.yml
175+
parameters:
176+
app.route_prefix: 'foo'
177+
178+
.. code-block:: xml
179+
180+
<!-- app/config/config.xml -->
181+
<?xml version="1.0" charset="UTF-8" ?>
182+
<container xmlns="http://symfony.com/schema/dic/services"
183+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
184+
xsi:schemaLocation="http://symfony.com/schema/dic/services
185+
https://symfony.com/schema/dic/services/services-1.0.xsd">
186+
187+
<parameters>
188+
<parameter key="app.route_prefix">foo</parameter>
189+
</parameters>
190+
</container>
191+
192+
.. code-block:: php
193+
194+
// app/config/config.php
195+
$container->setParameter('app.route_prefix', 'foo');
196+
167197
.. note::
168198

169199
Just like in normal service container configuration files, if you actually

0 commit comments

Comments
 (0)