File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 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:
377377``app.token ``
378378 A :class: `Symfony\\ Component\\ Security\\ Core\\ Authentication\\ Token\\ TokenInterface `
379379 object representing the security token.
380+ ``app.current_route ``
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 `` and ``app.current_route_parameters `` variables
390+ were introduced in Symfony 6.2.
380391
381392In addition to the global ``app `` variable injected by Symfony, you can also
382393:doc: `inject variables automatically to all Twig templates </templating/global_variables >`.
You can’t perform that action at this time.
0 commit comments