File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -1603,14 +1603,11 @@ information in a controller via the ``Request`` object::
1603
1603
}
1604
1604
}
1605
1605
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
1608
- the current route and its attributes:
1609
-
1610
- .. code-block :: twig
1611
-
1612
- {% app.current_route %}
1613
- {% app.current_route_parameters %}
1606
+ In services, you can get this information by
1607
+ :doc: `injecting the RequestStack service </service_container/request >`.
1608
+ In templates, use the :ref: `Twig global app variable <twig-app-variable >`
1609
+ to get the current route name (``app.current_route ``) and its parameters
1610
+ (``app.current_route_parameters ``).
1614
1611
1615
1612
.. versionadded :: 6.2
1616
1613
You can’t perform that action at this time.
0 commit comments