-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Twig Extensions Reference minor brush-up #7613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <reference-twig-functions>`, :ref:`filters <reference-twig-filters>`, | ||
:ref:`tags <reference-twig-tags>` and :ref:`tests <reference-twig-tests>` | ||
that are available when using the Symfony Core Framework. | ||
The Symfony Framework adds quite a few extra :ref:`functions <reference-twig-functions>`, | ||
:ref:`filters <reference-twig-filters>`, :ref:`tags <reference-twig-tags>` | ||
and :ref:`tests <reference-twig-tests>` to seamlessly integrate the various | ||
Symfony Components with Twig templates. The following sections describe these | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. components |
||
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`. | ||
|
||
.. note:: | ||
|
||
This reference only covers the Twig extensions provided by the Symfony | ||
Framework. You are probably using some other bundles as well, and those | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. framework |
||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't used anywhere here, is it? |
||
.. _`Twig Bridge`: https://github.com/symfony/symfony/tree/master/src/Symfony/Bridge/Twig/Extension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
framework