mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-17 21:07:18 +00:00
Merge branch '2.x' into 3.x
* 2.x: Tweak wording on docs Adding link to RFC
This commit is contained in:
@@ -25,8 +25,13 @@ By default, the filter uses the current locale. You can pass it explicitly:
|
||||
|
||||
$ composer require twig/intl-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
|
||||
|
||||
@@ -28,8 +28,13 @@ By default, the filter uses the current locale. You can pass it explicitly:
|
||||
|
||||
$ composer require twig/intl-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
|
||||
|
||||
@@ -28,8 +28,13 @@ By default, the filter uses the current locale. You can pass it explicitly:
|
||||
|
||||
$ composer require twig/intl-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
``data_uri``
|
||||
============
|
||||
|
||||
The ``data_uri`` filter generates a URL using the data scheme as defined in RFC
|
||||
2397:
|
||||
The ``data_uri`` filter generates a URL using the data scheme as defined in
|
||||
`RFC 2397`_:
|
||||
|
||||
.. code-block:: html+twig
|
||||
|
||||
@@ -28,8 +28,13 @@ The ``data_uri`` filter generates a URL using the data scheme as defined in RFC
|
||||
|
||||
$ composer require twig/html-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Html\HtmlExtension;
|
||||
|
||||
@@ -38,7 +43,7 @@ The ``data_uri`` filter generates a URL using the data scheme as defined in RFC
|
||||
|
||||
.. note::
|
||||
|
||||
The filter does not perform any length validation on purpose (limits depends
|
||||
The filter does not perform any length validation on purpose (limit depends
|
||||
on the usage context), validation should be done before calling this filter.
|
||||
|
||||
Arguments
|
||||
@@ -46,3 +51,5 @@ Arguments
|
||||
|
||||
* ``mime``: The mime type
|
||||
* ``parameters``: An array of parameters
|
||||
|
||||
.. _RFC 2397: https://tools.ietf.org/html/rfc2397
|
||||
|
||||
@@ -56,8 +56,13 @@ By default, the filter uses the current locale. You can pass it explicitly:
|
||||
|
||||
$ composer require twig/intl-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
|
||||
|
||||
@@ -13,8 +13,13 @@ the :doc:`format_datetime<format_datetime>` filter, but without the time.
|
||||
|
||||
$ composer require twig/intl-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
|
||||
|
||||
@@ -49,8 +49,13 @@ By default, the filter uses the current locale. You can pass it explicitly:
|
||||
|
||||
$ composer require twig/intl-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
|
||||
|
||||
@@ -96,8 +96,13 @@ By default, the filter uses the current locale. You can pass it explicitly:
|
||||
|
||||
$ composer require twig/intl-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
|
||||
|
||||
@@ -13,8 +13,13 @@ the :doc:`format_datetime<format_datetime>` filter, but without the date.
|
||||
|
||||
$ composer require twig/intl-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
|
||||
|
||||
@@ -28,8 +28,13 @@ You can also use the filter on an included file:
|
||||
|
||||
$ composer require twig/inky-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Inky\InkyExtension;
|
||||
|
||||
|
||||
@@ -52,8 +52,13 @@ Note that the CSS inliner works on an entire HTML document, not a fragment.
|
||||
|
||||
$ composer require twig/cssinliner-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\CssInliner\CssInlinerExtension;
|
||||
|
||||
|
||||
@@ -28,8 +28,13 @@ By default, the filter uses the current locale. You can pass it explicitly:
|
||||
|
||||
$ composer require twig/intl-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
|
||||
|
||||
@@ -28,8 +28,13 @@ By default, the filter uses the current locale. You can pass it explicitly:
|
||||
|
||||
$ composer require twig/intl-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
|
||||
|
||||
@@ -41,8 +41,13 @@ You can also use the filter on an included file or a variable:
|
||||
|
||||
$ composer require twig/markdown-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Markdown\MarkdownExtension;
|
||||
|
||||
|
||||
@@ -39,8 +39,13 @@ The ``slug`` filter uses the method by the same name in Symfony's
|
||||
|
||||
$ composer require twig/string-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\String\StringExtension;
|
||||
|
||||
|
||||
@@ -27,8 +27,13 @@ By default, the filter uses the current locale. You can pass it explicitly:
|
||||
|
||||
$ composer require twig/intl-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
|
||||
|
||||
+7
-2
@@ -73,8 +73,13 @@ For large strings manipulation, use the ``apply`` tag:
|
||||
|
||||
$ composer require twig/string-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\String\StringExtension;
|
||||
|
||||
|
||||
@@ -18,8 +18,13 @@ with a given country code:
|
||||
|
||||
$ composer require twig/intl-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
|
||||
|
||||
@@ -21,8 +21,13 @@ names together:
|
||||
|
||||
$ composer require twig/html-extra
|
||||
|
||||
Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
|
||||
explicitly on the Twig environment::
|
||||
Then, on Symfony projects, install the ``twig/extra-bundle``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer require twig/extra-bundle
|
||||
|
||||
Otherwise, add the extension explicitly on the Twig environment::
|
||||
|
||||
use Twig\Extra\Html\HtmlExtension;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user