File tree 1 file changed +11
-0
lines changed 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -377,6 +377,17 @@ gives you access to these variables:
377
377
``app.token ``
378
378
A :class: `Symfony\\ Component\\ Security\\ Core\\ Authentication\\ Token\\ TokenInterface `
379
379
object representing the security token.
380
+ ``app.current_route_name ``
381
+ The name of the route associated to the current request or ``null `` if no
382
+ request is available (equivalent to ``app.request.attributes.get('_route') ``)
383
+ ``app.current_route_parameters ``
384
+ An array with the parameters passed to the route of the current request or an
385
+ empty array if no request is available (equivalent to ``app.request.attributes.get('_route_params') ``)
386
+
387
+ .. versionadded :: 6.2
388
+
389
+ The ``app.current_route_name `` and ``app.current_route_parameters `` variables
390
+ were introduced in Symfony 6.2.
380
391
381
392
In addition to the global ``app `` variable injected by Symfony, you can also
382
393
:doc: `inject variables automatically to all Twig templates </templating/global_variables >`.
You can’t perform that action at this time.
0 commit comments