Skip to content

Commit 1afa17a

Browse files
committed
minor #7613 Twig Extensions Reference minor brush-up (mpdude)
This PR was squashed before being merged into the master branch (closes #7613). Discussion ---------- Twig Extensions Reference minor brush-up Especially clarify that the "Twig Extensions Repository" has nothing to do with Symfony Standard Edition Commits ------- b48b4c4 Twig Extensions Reference minor brush-up
2 parents f9dafd6 + b48b4c4 commit 1afa17a

File tree

1 file changed

+27
-18
lines changed

1 file changed

+27
-18
lines changed

reference/twig_reference.rst

+27-18
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,32 @@ Symfony Twig Extensions
77
=======================
88

99
Twig is the default template engine for Symfony. By itself, it already contains
10-
a lot of built-in functions, filters, tags and tests (learn more about them
11-
from the `Twig Reference`_).
10+
a lot of built-in functions, filters, tags and tests. You can learn more about
11+
them from the `Twig Reference`_.
1212

13-
Symfony adds custom extensions on top of Twig to integrate some components
14-
into the Twig templates. The following sections describe the custom
15-
:ref:`functions <reference-twig-functions>`, :ref:`filters <reference-twig-filters>`,
16-
:ref:`tags <reference-twig-tags>` and :ref:`tests <reference-twig-tests>`
17-
that are available when using the Symfony Core Framework.
13+
The Symfony framework adds quite a few extra :ref:`functions <reference-twig-functions>`,
14+
:ref:`filters <reference-twig-filters>`, :ref:`tags <reference-twig-tags>`
15+
and :ref:`tests <reference-twig-tests>` to seamlessly integrate the
16+
various Symfony components with Twig templates. The following sections
17+
describe these extra features.
1818

19-
There may also be tags in bundles you use that aren't listed here.
19+
.. tip::
20+
21+
  Technically, most of the extensions live in the `Twig Bridge`_. That code
22+
might give you some ideas when you need to write your own Twig extension
23+
as described in :doc:`/templating/twig_extension`.
24+
25+
.. note::
26+
27+
This reference only covers the Twig extensions provided by the Symfony
28+
framework. You are probably using some other bundles as well, and
29+
those might come with their own extensions not covered here.
30+
31+
.. tip::
32+
33+
  The `Twig Extensions repository`_ contains some additional Twig extensions
34+
that do not belong to the Twig core, so you might want to have a look at
35+
the `Twig Extensions documentation`_.
2036

2137
.. _reference-twig-functions:
2238

@@ -721,14 +737,7 @@ The available attributes are:
721737
* ``app.environment``
722738
* ``app.debug``
723739

724-
Symfony Standard Edition Extensions
725-
-----------------------------------
726-
727-
The Symfony Standard Edition adds some bundles to the Symfony Core Framework.
728-
Those bundles can have other Twig extensions:
729-
730-
* **Twig Extensions** includes some interesting extensions that do not belong
731-
to the Twig core. You can read more in `the official Twig Extensions documentation`_.
732-
733740
.. _`Twig Reference`: http://twig.sensiolabs.org/documentation#reference
734-
.. _`the official Twig Extensions documentation`: http://twig-extensions.readthedocs.io/
741+
.. _`Twig Extensions repository`: https://github.com/twigphp/Twig-extensions
742+
.. _`Twig Extensions documentation`: http://twig-extensions.readthedocs.io/en/latest/
743+
.. _`Twig Bridge`: https://github.com/symfony/symfony/tree/master/src/Symfony/Bridge/Twig/Extension

0 commit comments

Comments
 (0)