Skip to content
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

Update api docs #858

Merged
merged 1 commit into from
Oct 13, 2012
Merged
Changes from all 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
29 changes: 25 additions & 4 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ The following options are available:

* ``autoescape``: If set to ``true``, auto-escaping will be enabled by default
for all templates (default to ``true``). As of Twig 1.8, you can set the
escaping strategy to use (``html``, ``js``, ``css``, ``false`` to disable,
or a PHP callback that takes the template "filename" and must return the
escaping strategy to use -- the callback cannot be a function name to avoid
collision with built-in escaping strategies).
escaping strategy to use (``html``, ``js``, ``false`` to disable).
As of Twig 1.9, you can set the escaping strategy to use (``css``, ``url``,
``html_attr``, or a PHP callback that takes the template "filename" and must
return the escaping strategy to use -- the callback cannot be a function name
to avoid collision with built-in escaping strategies).

* ``optimizations``: A flag that indicates which optimizations to apply
(default to ``-1`` -- all optimizations are enabled; set it to ``0`` to
Expand Down Expand Up @@ -269,6 +270,13 @@ The ``core`` extension defines all the core features of Twig:
* ``from``
* ``set``
* ``spaceless``
* ``autoescape``
* ``do``
* ``embed``
* ``flush``
* ``raw``
* ``sandbox``
* ``use``

* Filters:

Expand All @@ -291,6 +299,14 @@ The ``core`` extension defines all the core features of Twig:
* ``keys``
* ``escape``
* ``e``
* ``abs``
* ``convert_encoding``
* ``date_modify``
* ``nl2br``
* ``number_format``
* ``raw``
* ``slice``
* ``trim``

* Functions:

Expand All @@ -299,6 +315,10 @@ The ``core`` extension defines all the core features of Twig:
* ``cycle``
* ``parent``
* ``block``
* ``attribute``
* ``date``
* ``dump``
* ``random``

* Tests:

Expand All @@ -310,6 +330,7 @@ The ``core`` extension defines all the core features of Twig:
* ``divisibleby``
* ``constant``
* ``empty``
* ``iterable``

Escaper Extension
~~~~~~~~~~~~~~~~~
Expand Down