File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,7 @@ an argument to the ``render`` helper:
305
305
306
306
.. code-block :: jinja
307
307
308
- {{ form.title|render([ 'class': 'important'] ) }}
308
+ {{ form.title|render({ 'class': 'important' } ) }}
309
309
310
310
.. code-block :: html+php
311
311
@@ -320,7 +320,7 @@ representation. You can pass them in the next argument.
320
320
321
321
.. code-block :: jinja
322
322
323
- {{ form.country|render([], [ 'separator': ' -- Other countries -- '] ) }}
323
+ {{ form.country|render({}, { 'separator': ' -- Other countries -- ' } ) }}
324
324
325
325
.. code-block :: html+php
326
326
@@ -335,7 +335,7 @@ completely change the HTML output of the helper:
335
335
336
336
.. code-block :: jinja
337
337
338
- {{ form.title|render([], [] , 'HelloBundle::form.twig') }}
338
+ {{ form.title|render({}, {} , 'HelloBundle::form.twig') }}
339
339
340
340
.. code-block :: html+php
341
341
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ template, use the ``render`` tag:
196
196
.. code-block :: jinja
197
197
198
198
{# src/Application/HelloBundle/Resources/views/Hello/index.twig #}
199
- {% render "HelloBundle:Hello:fancy" with [ 'name': name, 'color': 'green'] %}
199
+ {% render "HelloBundle:Hello:fancy" with { 'name': name, 'color': 'green' } %}
200
200
201
201
Here, the ``HelloBundle:Hello:fancy `` string refers to the ``fancy `` action of
202
202
the ``Hello `` controller, and the argument is used as simulated request path
@@ -227,7 +227,7 @@ updated by changing the configuration:
227
227
228
228
.. code-block :: jinja
229
229
230
- <a href="{% path 'hello' with [ 'name': 'Thomas'] %}">Greet Thomas!</a>
230
+ <a href="{% path 'hello' with { 'name': 'Thomas' } %}">Greet Thomas!</a>
231
231
232
232
The ``path `` tag takes the route name and an array of parameters as arguments.
233
233
The route name is the main key under which routes are referenced and the
@@ -243,7 +243,7 @@ parameters are the values of the placeholders defined in the route pattern:
243
243
.. tip ::
244
244
245
245
You can also generate absolute URLs with the ``url `` tag: ``{% url 'hello'
246
- with [ 'name': 'Thomas'] %} ``.
246
+ with { 'name': 'Thomas' } %} ``.
247
247
248
248
Using Assets: images, JavaScripts, and stylesheets
249
249
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments