Skip to content

Commit 5419341

Browse files
committed
bug #12186 fix a little code example issue (padabou)
This PR was merged into the 4.3 branch. Discussion ---------- fix a little code example issue change : {% set route_name = app.request.attributes('_route') %} {% set route_parameters = app.request.attributes('_route_params') %} by : {% set route_name = app.request.attributes.get('_route') %} {% set route_parameters = app.request.attributes.get('_route_params') %} <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 1d2d9c3 fix a little code example issue
2 parents c04ea2c + 1d2d9c3 commit 5419341

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,8 +1243,8 @@ to get the request and its attributes:
12431243

12441244
.. code-block:: twig
12451245
1246-
{% set route_name = app.request.attributes('_route') %}
1247-
{% set route_parameters = app.request.attributes('_route_params') %}
1246+
{% set route_name = app.request.attributes.get('_route') %}
1247+
{% set route_parameters = app.request.attributes.get('_route_params') %}
12481248
12491249
{# use this to get all the available attributes (not only routing ones) #}
12501250
{% set all_attributes = app.request.attributes.all %}

0 commit comments

Comments
 (0)