From e60d6fbf4795bc700e4446bb6a840bb587b93076 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Sat, 11 Mar 2017 23:38:08 +0100 Subject: [PATCH 1/3] Twig Extensions Reference minor brush-up Especially clarify that the "Twig Extensions Repository" has nothing to do with Symfony Standard Edition --- reference/twig_reference.rst | 46 ++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/reference/twig_reference.rst b/reference/twig_reference.rst index 78d1b45d807..0e2c7e80304 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -7,17 +7,33 @@ Symfony Twig Extensions ======================= Twig is the default template engine for Symfony. By itself, it already contains -a lot of built-in functions, filters, tags and tests (learn more about them -from the `Twig Reference`_). +a lot of built-in functions, filters, tags and tests. You can learn more about +them from the `Twig Reference`_. -Symfony adds custom extensions on top of Twig to integrate some components -into the Twig templates. The following sections describe the custom -:ref:`functions `, :ref:`filters `, -:ref:`tags ` and :ref:`tests ` -that are available when using the Symfony Core Framework. +The Symfony Framework adds quite a few extra :ref:`functions `, +:ref:`filters `, :ref:`tags ` +and :ref:`tests ` to seamlessly integrate the various +Symfony Components with Twig templates. The following sections describe these +extra features. -There may also be tags in bundles you use that aren't listed here. +.. tip:: + +   Technically, most of the extensions live in the `Twig Bridge`_. That code + might give you some ideas when you need to write your own Twig extension + as described in :doc:`/templating/twig_extension.rst`. + +.. note:: + This reference only covers the Twig extensions provided by the Symfony + Framework. You are probably using some other bundles as well, and those + might come with their own extensions not covered here. + +.. tip:: + +   The `Twig Extensions repository`_ contains some additional Twig extensions + that do not belong to the Twig core, so you might want to have a look at + the `Twig Extensions documentation`_. + .. _reference-twig-functions: Functions @@ -721,14 +737,8 @@ The available attributes are: * ``app.environment`` * ``app.debug`` -Symfony Standard Edition Extensions ------------------------------------ - -The Symfony Standard Edition adds some bundles to the Symfony Core Framework. -Those bundles can have other Twig extensions: - -* **Twig Extensions** includes some interesting extensions that do not belong - to the Twig core. You can read more in `the official Twig Extensions documentation`_. - .. _`Twig Reference`: http://twig.sensiolabs.org/documentation#reference -.. _`the official Twig Extensions documentation`: http://twig.sensiolabs.org/doc/extensions/index.html +.. _`Twig Extensions repository`: https://github.com/twigphp/Twig-extensions +.. _`Twig Extensions documentation`: http://twig-extensions.readthedocs.io/en/latest/ +.. _`KernelEvents`: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/KernelEvents.php +.. _`Twig Bridge`: https://github.com/symfony/symfony/tree/master/src/Symfony/Bridge/Twig/Extension    From 3d8c21568d242c6309cd96a51db4b6db00b1c544 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Mon, 13 Mar 2017 10:03:16 +0100 Subject: [PATCH 2/3] Fix file reference --- 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 0e2c7e80304..66458acedf6 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -20,7 +20,7 @@ extra features.   Technically, most of the extensions live in the `Twig Bridge`_. That code might give you some ideas when you need to write your own Twig extension - as described in :doc:`/templating/twig_extension.rst`. + as described in :doc:`/templating/twig_extension`. .. note:: From 12621bf6c1eda76b067db5afb44902780ceb395f Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Mon, 13 Mar 2017 11:40:11 +0100 Subject: [PATCH 3/3] Fix capitalization, remove unused reference --- reference/twig_reference.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/reference/twig_reference.rst b/reference/twig_reference.rst index 66458acedf6..e2ea8e67f37 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -10,11 +10,11 @@ Twig is the default template engine for Symfony. By itself, it already contains a lot of built-in functions, filters, tags and tests. You can learn more about them from the `Twig Reference`_. -The Symfony Framework adds quite a few extra :ref:`functions `, +The Symfony framework adds quite a few extra :ref:`functions `, :ref:`filters `, :ref:`tags ` -and :ref:`tests ` to seamlessly integrate the various -Symfony Components with Twig templates. The following sections describe these -extra features. +and :ref:`tests ` to seamlessly integrate the +various Symfony components with Twig templates. The following sections +describe these extra features. .. tip:: @@ -25,8 +25,8 @@ extra features. .. note:: This reference only covers the Twig extensions provided by the Symfony - Framework. You are probably using some other bundles as well, and those - might come with their own extensions not covered here. + framework. You are probably using some other bundles as well, and + those might come with their own extensions not covered here. .. tip:: @@ -740,5 +740,4 @@ The available attributes are: .. _`Twig Reference`: http://twig.sensiolabs.org/documentation#reference .. _`Twig Extensions repository`: https://github.com/twigphp/Twig-extensions .. _`Twig Extensions documentation`: http://twig-extensions.readthedocs.io/en/latest/ -.. _`KernelEvents`: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/KernelEvents.php .. _`Twig Bridge`: https://github.com/symfony/symfony/tree/master/src/Symfony/Bridge/Twig/Extension