File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1603,15 +1603,14 @@ information in a controller via the ``Request`` object::
1603
1603
}
1604
1604
}
1605
1605
1606
- You can get this information in services too injecting the ``request_stack ``
1607
- service to :doc: `get the Request object in a service </service_container/request >`.
1608
- In templates, use the :ref: `Twig global app variable <twig-app-variable >` to get
1606
+ To get this information in a service, see :doc: `/service_container/request `.
1607
+ In templates, you can use the :ref: `Twig global app variable <twig-app-variable >` to get
1609
1608
the current route and its attributes:
1610
1609
1611
1610
.. code-block :: twig
1612
1611
1613
- {% set route_name = app.current_route %}
1614
- {% set route_parameters = app.current_route_parameters %}
1612
+ {% app.current_route %}
1613
+ {% app.current_route_parameters %}
1615
1614
1616
1615
.. versionadded :: 6.2
1617
1616
You can’t perform that action at this time.
0 commit comments