Skip to content

Commit 0f6fb0d

Browse files
committed
Merge branch '2.7' into 2.8
2 parents 0b3985d + d96d75e commit 0f6fb0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+241
-241
lines changed

Diff for: best_practices/configuration.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ from places with access to the Symfony container.
128128
Constants can be used for example in your Twig templates thanks to the
129129
`constant() function`_:
130130

131-
.. code-block:: html+jinja
131+
.. code-block:: html+twig
132132

133133
<p>
134134
Displaying the {{ constant('NUM_ITEMS', post) }} most recent results.

Diff for: best_practices/forms.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ This is also an important error, because you are mixing presentation markup
137137
always a good practice to follow, so put all the view-related things in the
138138
view layer:
139139

140-
.. code-block:: html+jinja
140+
.. code-block:: html+twig
141141

142142
{{ form_start(form) }}
143143
{{ form_widget(form) }}
@@ -157,7 +157,7 @@ One of the simplest ways - which is especially useful during development -
157157
is to render the form tags and use ``form_widget()`` to render all of the
158158
fields:
159159

160-
.. code-block:: html+jinja
160+
.. code-block:: html+twig
161161

162162
{{ form_start(form, {'attr': {'class': 'my-form-class'} }) }}
163163
{{ form_widget(form) }}

Diff for: best_practices/web-assets.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ the application assets are in one location.
1616
Templates also benefit from centralizing your assets, because the links are
1717
much more concise:
1818

19-
.. code-block:: html+jinja
19+
.. code-block:: html+twig
2020

2121
<link rel="stylesheet" href="{{ asset('css/bootstrap.min.css') }}" />
2222
<link rel="stylesheet" href="{{ asset('css/main.css') }}" />
@@ -54,7 +54,7 @@ of compiling assets developed with a lot of different frontend technologies
5454
like LESS, Sass and CoffeeScript. Combining all your assets with Assetic is a
5555
matter of wrapping all the assets with a single Twig tag:
5656

57-
.. code-block:: html+jinja
57+
.. code-block:: html+twig
5858

5959
{% stylesheets
6060
'css/bootstrap.min.css'

Diff for: book/controller.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ read any flash messages from the session::
659659

660660
.. configuration-block::
661661

662-
.. code-block:: html+jinja
662+
.. code-block:: html+twig
663663

664664
{% for flash_message in app.session.flashbag.get('notice') %}
665665
<div class="flash-notice">

Diff for: book/forms.rst

+14-14
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ helper functions:
142142

143143
.. configuration-block::
144144

145-
.. code-block:: html+jinja
145+
.. code-block:: html+twig
146146

147147
{# app/Resources/views/default/new.html.twig #}
148148
{{ form_start(form) }}
@@ -450,7 +450,7 @@ corresponding errors printed out with the form.
450450

451451
.. configuration-block::
452452

453-
.. code-block:: html+jinja
453+
.. code-block:: html+twig
454454

455455
{# app/Resources/views/default/new.html.twig #}
456456
{{ form(form, {'attr': {'novalidate': 'novalidate'}}) }}
@@ -798,7 +798,7 @@ of code. Of course, you'll usually need much more flexibility when rendering:
798798

799799
.. configuration-block::
800800

801-
.. code-block:: html+jinja
801+
.. code-block:: html+twig
802802

803803
{# app/Resources/views/default/new.html.twig #}
804804
{{ form_start(form) }}
@@ -840,7 +840,7 @@ output can be customized on many different levels.
840840

841841
.. configuration-block::
842842

843-
.. code-block:: jinja
843+
.. code-block:: twig
844844
845845
{{ form.vars.value.task }}
846846
@@ -862,7 +862,7 @@ used the ``form_row`` helper:
862862

863863
.. configuration-block::
864864

865-
.. code-block:: html+jinja
865+
.. code-block:: html+twig
866866

867867
{{ form_start(form) }}
868868
{{ form_errors(form) }}
@@ -914,7 +914,7 @@ specify it:
914914

915915
.. configuration-block::
916916

917-
.. code-block:: html+jinja
917+
.. code-block:: html+twig
918918

919919
{{ form_label(form.task, 'Task Description') }}
920920

@@ -930,7 +930,7 @@ field:
930930

931931
.. configuration-block::
932932

933-
.. code-block:: html+jinja
933+
.. code-block:: html+twig
934934

935935
{{ form_widget(form.task, {'attr': {'class': 'task_field'}}) }}
936936

@@ -946,7 +946,7 @@ to get the ``id``:
946946

947947
.. configuration-block::
948948

949-
.. code-block:: html+jinja
949+
.. code-block:: html+twig
950950

951951
{{ form.task.vars.id }}
952952

@@ -959,7 +959,7 @@ the ``full_name`` value:
959959

960960
.. configuration-block::
961961

962-
.. code-block:: html+jinja
962+
.. code-block:: html+twig
963963

964964
{{ form.task.vars.full_name }}
965965

@@ -1016,7 +1016,7 @@ to the ``form()`` or the ``form_start()`` helper:
10161016

10171017
.. configuration-block::
10181018

1019-
.. code-block:: html+jinja
1019+
.. code-block:: html+twig
10201020

10211021
{# app/Resources/views/default/new.html.twig #}
10221022
{{ form_start(form, {'action': path('target_route'), 'method': 'GET'}) }}
@@ -1390,7 +1390,7 @@ Render the ``Category`` fields in the same way as the original ``Task`` fields:
13901390

13911391
.. configuration-block::
13921392

1393-
.. code-block:: html+jinja
1393+
.. code-block:: html+twig
13941394

13951395
{# ... #}
13961396

@@ -1459,7 +1459,7 @@ do this, create a new template file that will store the new markup:
14591459

14601460
.. configuration-block::
14611461

1462-
.. code-block:: html+jinja
1462+
.. code-block:: html+twig
14631463

14641464
{# app/Resources/views/form/fields.html.twig #}
14651465
{% block form_row %}
@@ -1488,7 +1488,7 @@ renders the form:
14881488

14891489
.. configuration-block::
14901490

1491-
.. code-block:: html+jinja
1491+
.. code-block:: html+twig
14921492

14931493
{# app/Resources/views/default/new.html.twig #}
14941494
{% form_theme form 'form/fields.html.twig' %}
@@ -1672,7 +1672,7 @@ to define form output.
16721672
In Twig, you can also customize a form block right inside the template
16731673
where that customization is needed:
16741674

1675-
.. code-block:: html+jinja
1675+
.. code-block:: html+twig
16761676

16771677
{% extends 'base.html.twig' %}
16781678

Diff for: book/from_flat_php_to_symfony2.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ called `Twig`_ that makes templates faster to write and easier to read.
710710
It means that the sample application could contain even less code! Take,
711711
for example, the list template written in Twig:
712712

713-
.. code-block:: html+jinja
713+
.. code-block:: html+twig
714714

715715
{# app/Resources/views/blog/list.html.twig #}
716716
{% extends "layout.html.twig" %}
@@ -732,7 +732,7 @@ for example, the list template written in Twig:
732732

733733
The corresponding ``layout.html.twig`` template is also easier to write:
734734

735-
.. code-block:: html+jinja
735+
.. code-block:: html+twig
736736

737737
{# app/Resources/views/layout.html.twig #}
738738
<!DOCTYPE html>

Diff for: book/http_cache.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ matter), Symfony uses the standard ``render`` helper to configure ESI tags:
10731073

10741074
.. configuration-block::
10751075

1076-
.. code-block:: jinja
1076+
.. code-block:: twig
10771077
10781078
{# app/Resources/views/static/about.html.twig #}
10791079

Diff for: book/page_creation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ a ``number.html.twig`` file inside of it:
374374

375375
.. configuration-block::
376376

377-
.. code-block:: jinja
377+
.. code-block:: twig
378378
379379
{# app/Resources/views/lucky/number.html.twig #}
380380
{% extends 'base.html.twig' %}

Diff for: book/routing.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ a template helper function:
15341534

15351535
.. configuration-block::
15361536

1537-
.. code-block:: html+jinja
1537+
.. code-block:: html+twig
15381538

15391539
<a href="{{ path('blog_show', {'slug': 'my-blog-post'}) }}">
15401540
Read this blog post.
@@ -1567,7 +1567,7 @@ to ``generate()``:
15671567

15681568
.. configuration-block::
15691569

1570-
.. code-block:: html+jinja
1570+
.. code-block:: html+twig
15711571

15721572
<a href="{{ url('blog_show', {'slug': 'my-blog-post'}) }}">
15731573
Read this blog post.

Diff for: book/security.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ the built-in helper function:
888888

889889
.. configuration-block::
890890

891-
.. code-block:: html+jinja
891+
.. code-block:: html+twig
892892

893893
{% if is_granted('ROLE_ADMIN') %}
894894
<a href="...">Delete</a>
@@ -910,7 +910,7 @@ covers all URLs (as shown before in this chapter).
910910
some internal Symfony details, to avoid broken error pages in the ``prod``
911911
environment, wrap calls in these templates with a check for ``app.user``:
912912

913-
.. code-block:: html+jinja
913+
.. code-block:: html+twig
914914

915915
{% if app.user and is_granted('ROLE_ADMIN') %}
916916

@@ -1085,7 +1085,7 @@ key:
10851085

10861086
.. configuration-block::
10871087

1088-
.. code-block:: html+jinja
1088+
.. code-block:: html+twig
10891089

10901090
{% if is_granted('IS_AUTHENTICATED_FULLY') %}
10911091
<p>Username: {{ app.user.username }}</p>

0 commit comments

Comments
 (0)