Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
mpdude wants to merge4 commits intosymfony:masterfrommpdude:patch-2
Closed
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 27 additions & 18 deletionsreference/twig_reference.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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 canlearn more about
themfrom the `Twig Reference`_.

Symfony addscustom 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.
TheSymfonyframeworkaddsquite 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 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 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
Expand DownExpand Up@@ -721,14 +737,7 @@ 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-extensions.readthedocs.io/
.. _`Twig Extensions repository`: https://github.com/twigphp/Twig-extensions
.. _`Twig Extensions documentation`: http://twig-extensions.readthedocs.io/en/latest/
.. _`Twig Bridge`: https://github.com/symfony/symfony/tree/master/src/Symfony/Bridge/Twig/Extension   

[8]ページ先頭

©2009-2025 Movatter.jp