File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -1612,15 +1612,11 @@ information in a controller via the ``Request`` object::
16121612 }
16131613 }
16141614
1615- You can get this information in services too injecting the ``request_stack ``
1616- service to :doc: `get the Request object in a service </service_container/request >`.
1617- In templates, use the :ref: `Twig global app variable <twig-app-variable >` to get
1618- the current route and its attributes:
1619-
1620- .. code-block :: twig
1621-
1622- {% set route_name = app.current_route %}
1623- {% set route_parameters = app.current_route_parameters %}
1615+ In services, you can get this information by
1616+ :doc: `injecting the RequestStack service </service_container/request >`.
1617+ In templates, use the :ref: `Twig global app variable <twig-app-variable >`
1618+ to get the current route name (``app.current_route ``) and its parameters
1619+ (``app.current_route_parameters ``).
16241620
16251621.. versionadded :: 6.2
16261622
You can’t perform that action at this time.
0 commit comments