8000 bug #4954 Fixed some syntax issues in Twig Reference (javiereguiluz) · symfony/symfony-docs@6d65564 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6d65564

Browse files
committed
bug #4954 Fixed some syntax issues in Twig Reference (javiereguiluz)
This PR was squashed before being merged into the 2.3 branch (closes #4954). Discussion ---------- Fixed some syntax issues in Twig Reference | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | - Commits ------- 92657b4 Fixed some syntax issues in Twig Reference
2 parents 5d8456f + 92657b4 commit 6d65564

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

reference/twig_reference.rst

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ Twig is the default template engine for Symfony. By itself, it already contains
1010
a lot of built-in functions, filters, tags and tests (learn more about them
1111
from the `Twig Reference`_).
1212

13-
Symfony adds more custom extensions on top of Twig to integrate some components
14-
into the Twig templates. You can find more information about the custom
13+
Symfony adds custom extensions on top of Twig to integrate some components
14+
into the Twig templates. The following sections describe the custom
1515
:ref:`functions <reference-twig-functions>`, :ref:`filters <reference-twig-filters>`,
1616
:ref:`tags <reference-twig-tags>` and :ref:`tests <reference-twig-tests>`
17-
that are added when using the Symfony Core Framework.
17+
that are available when using the Symfony Core Framework.
1818

1919
There may also be tags in bundles you use that aren't listed here.
2020

@@ -50,6 +50,8 @@ The render strategy can be specified in the ``strategy`` key of the options.
5050

5151
The URI can be generated by other functions, like `path`_ and `url`_.
5252

53+
.. _reference-twig-function-render-esi:
54+
5355
render_esi
5456
~~~~~~~~~~
5557

@@ -62,7 +64,7 @@ render_esi
6264
``options``
6365
**type**: ``array`` **default**: ``[]``
6466

65-
Generates an ESI tag when possible or falls back to the behaviour of
67+
Generates an ESI tag when possible or falls back to the behavior of
6668
`render`_ function instead. For more information, see
6769
:ref:`templating-embedding-controller`.
6870

@@ -95,7 +97,8 @@ controller
9597
**type**: ``array`` **default**: ``[]``
9698

9799
Returns an instance of ``ControllerReference`` to be used with functions like
98-
:ref:`render() <reference-twig-function-render>` and `render_esi() <render_esi>`.
100+
:ref:`render() <reference-twig-function-render>` and
101+
:ref:`render_esi() <reference-twig-function-render-esi>`.
99102

100103
asset
101104
~~~~~
@@ -107,7 +110,7 @@ asset
107110
``path``
108111
**type**: ``string``
109112
``packageName``
110-
**type**: ``string``|``null`` **default**: ``null``
113+
**type**: ``string`` | ``null`` **default**: ``null``
111114

112115
Returns a public path to ``path``, which takes into account the base path set
113116
for the package and the URL path. More information in
@@ -121,7 +124,7 @@ asset_version
121124
{{ asset_version(packageName) }}
122125
123126
``packageName``
124-
**type**: ``string``|``null`` **default**: ``null``
127+
**type**: ``string`` | ``null`` **default**: ``null``
125128

126129
Returns the current version of the package, more information in
127130
:ref:`book-templating-assets`.
@@ -227,7 +230,7 @@ form_label
227230
``variables``
228231
**type**: ``array`` **default**: ``[]``
229232

230-
Renders the label for the given field, mre information in
233+
Renders the label for the given field, more information in
231234
:ref:`the Twig Form reference <reference-forms-twig-label>`.
232235

233236
form_row
@@ -463,7 +466,7 @@ abbr_class
463466
**type**: ``string``
464467

465468
Generates an ``<abbr>`` element with the short name of a PHP class (the FQCN
466-
will be shown in a tooltip when a user hovers over de element).
469+
will be shown in a tooltip when a user hovers over the element).
467470

468471
abbr_method
469472
~~~~~~~~~~~
@@ -501,7 +504,7 @@ format_args_as_text
501504
``args``
502505
**type**: ``array``
503506

504-
Equal to the `format_args`_ filter, but without using tags.
507+
Equal to the `format_args`_ filter, but without using HTML tags.
505508

506509
file_excerpt
507510
~~~~~~~~~~~~
@@ -515,7 +518,7 @@ file_excerpt
515518
``line``
516519
**type**: ``integer``
517520

518-
Generates an excerpt of 7 lines around the given ``line``.
521+
Generates an excerpt of seven lines around the given ``line``.
519522

520523
format_file
521524
~~~~~~~~~~~
@@ -545,7 +548,7 @@ format_file_from_text
545548
``text``
546549
**type**: ``string``
547550

548-
Uses `|format_file <format_file>` to improve the output of default PHP errors.
551+
Uses `format_file`_ to improve the output of default PHP errors.
549552

550553
file_link
551554
~~~~~~~~~
@@ -575,7 +578,7 @@ form_theme
575578
``form``
576579
**type**: ``FormView``
577580
``resources``
578-
**type**: ``array``|``string``
581+
**type**: ``array`` | ``string``
579582

580583
Sets the resources to override the form theme for the given form view instance.
581584
You can use ``_self`` as resources to set it to the current resource. More

0 commit comments

Comments
 (0)
0