From 0c8f102a9cc6efcc4af54a5632b4555aab81f758 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 15 Nov 2014 11:36:52 +0100 Subject: [PATCH 1/3] Fixed some typos and syntax errors in the Twig reference --- reference/twig_reference.rst | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/reference/twig_reference.rst b/reference/twig_reference.rst index 64a63f2064c..f2ec8ab7ca8 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -10,7 +10,7 @@ Twig is the default template engine for Symfony. By itself, it already contains a lot of built-in functions, filters, tags and tests (`http://twig.sensiolabs.org/documentation`_ then scroll to the bottom). -Symfony adds more custom extension on top of Twig to integrate some components +Symfony adds some custom extensions on top of Twig to integrate some components into the Twig templates. Below is information about all the custom functions, filters, tags and tests that are added when using the Symfony Core Framework. @@ -40,7 +40,7 @@ render Renders the fragment for the given controller (using the `controller`_ function) or URI. For more information, see :ref:`templating-embedding-controller`. -The render strategy can be specified in the ``strategy`` key of the options. +The render strategy can be specified in the ``strategy`` key of the options. .. tip:: @@ -58,14 +58,14 @@ render_esi ``options`` **type**: ``array`` **default**: ``[]`` -Generates an ESI tag when possible or falls back to the behaviour of +Generates an ESI tag when possible or falls back to the behavior of `render`_ function instead. For more information, see :ref:`templating-embedding-controller`. .. tip:: The URI can be generated by other functions, like `path`_ and `url`_. - + .. tip:: The ``render_esi()`` function is an example of the shortcut functions @@ -91,7 +91,7 @@ controller **type**: ``array`` **default**: ``[]`` Returns an instance of ``ControllerReference`` to be used with functions like -:ref:`render() ` and `render_esi() `. +:ref:`render() ` and :ref:`render_esi() `. asset ~~~~~ @@ -103,7 +103,7 @@ asset ``path`` **type**: ``string`` ``packageName`` - **type**: ``string``|``null`` **default**: ``null`` + **type**: ``string`` | ``null`` **default**: ``null`` Returns a public path to ``path``, which takes into account the base path set for the package and the URL path. More information in @@ -117,7 +117,7 @@ asset_version {{ asset_version(packageName) }} ``packageName`` - **type**: ``string``|``null`` **default**: ``null`` + **type**: ``string`` | ``null`` **default**: ``null`` Returns the current version of the package, more information in :ref:`book-templating-assets`. @@ -223,7 +223,7 @@ form_label ``variables`` **type**: ``array`` **default**: ``[]`` -Renders the label for the given field, mre information in +Renders the label for the given field, more information in :ref:`the Twig Form reference `. form_row @@ -397,7 +397,7 @@ transchoice .. code-block:: jinja - {{ message|transchoice(count, arguments, domai, locale) }} + {{ message|transchoice(count, arguments, domain, locale) }} ``message`` **type**: ``string`` @@ -444,7 +444,7 @@ yaml_dump ``dumpObjects`` **type**: ``boolean`` **default**: ``false`` -Does the same as `yaml_encode() `_, but includes the type in the output. +Does the same as :ref:`yaml_encode() `_, but includes the type in the output. abbr_class ~~~~~~~~~~ @@ -457,7 +457,7 @@ abbr_class **type**: ``string`` Generates an ```` element with the short name of a PHP class (the FQCN -will be shown in a tooltip when a user hovers over de element). +will be shown in a tooltip when a user hovers over the element). abbr_method ~~~~~~~~~~~ @@ -495,7 +495,7 @@ format_args_as_text ``args`` **type**: ``array`` -Equal to the `format_args`_ filter, but without using tags. +Equal to the `format_args`_ filter, but without using HTML tags. file_excerpt ~~~~~~~~~~~~ @@ -509,7 +509,7 @@ file_excerpt ``line`` **type**: ``integer`` -Generates an excerpt of 7 lines around the given ``line``. +Generates an excerpt of seven lines around the given ``line``. format_file ~~~~~~~~~~~ @@ -539,7 +539,7 @@ format_file_from_text ``text`` **type**: ``string`` -Uses `|format_file ` to improve the output of default PHP errors. +Uses :ref:`|format_file `_ to improve the output of default PHP errors. file_link ~~~~~~~~~ @@ -567,7 +567,7 @@ form_theme ``form`` **type**: ``FormView`` ``resources`` - **type**: ``array``|``string`` + **type**: ``array`` | ``string`` Sets the resources to override the form theme for the given form view instance. You can use ``_self`` as resources to set it to the current resource. More @@ -644,7 +644,7 @@ Global Variables app ~~~ -The ``app`` variable is available everywhere and gives access tomany commonly +The ``app`` variable is available everywhere and gives access to many commonly needed objects and values. It is an instance of :class:`Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables`. From 129593d60f575bbed9cb243d2a3aea47bb4825d3 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 15 Nov 2014 11:42:07 +0100 Subject: [PATCH 2/3] Fixed some reference links --- reference/twig_reference.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/twig_reference.rst b/reference/twig_reference.rst index f2ec8ab7ca8..881adafd5fd 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -444,7 +444,7 @@ yaml_dump ``dumpObjects`` **type**: ``boolean`` **default**: ``false`` -Does the same as :ref:`yaml_encode() `_, but includes the type in the output. +Does the same as `yaml_encode() `_, but includes the type in the output. abbr_class ~~~~~~~~~~ @@ -539,7 +539,7 @@ format_file_from_text ``text`` **type**: ``string`` -Uses :ref:`|format_file `_ to improve the output of default PHP errors. +Uses :ref:`|format_file ` to improve the output of default PHP errors. file_link ~~~~~~~~~ From 9e57a472a04dddbc3c164d6f6845bab7bbe619f9 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 15 Nov 2014 11:57:58 +0100 Subject: [PATCH 3/3] Fixed another reference link --- reference/twig_reference.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/twig_reference.rst b/reference/twig_reference.rst index 881adafd5fd..6390f1108dd 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -539,7 +539,7 @@ format_file_from_text ``text`` **type**: ``string`` -Uses :ref:`|format_file ` to improve the output of default PHP errors. +Uses `format_file`_ to improve the output of default PHP errors. file_link ~~~~~~~~~