mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-11 18:06:46 +00:00
Renamed inky to inky_to_html
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* added support for an "arrow" function on the "sort" filter
|
||||
* added the CssInliner extension in the "extra" repositories: "inline_css"
|
||||
filter
|
||||
* added the Inky extension in the "extra" repositories: "inky" filter
|
||||
* added the Inky extension in the "extra" repositories: "inky_to_html" filter
|
||||
* added Intl extension in the "extra" repositories: "country_name",
|
||||
"currency_name", "currency_symbol", "language_name", "locale_name",
|
||||
"timezone_name", "country_timezones", "format_currency", "format_number",
|
||||
|
||||
@@ -28,7 +28,7 @@ Filters
|
||||
format_time
|
||||
html_to_markdown
|
||||
inline_css
|
||||
inky
|
||||
inky_to_html
|
||||
join
|
||||
json_encode
|
||||
keys
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
``inky``
|
||||
========
|
||||
``inky_to_html``
|
||||
================
|
||||
|
||||
.. versionadded:: 2.12
|
||||
The ``inky`` filter was added in Twig 2.12.
|
||||
The ``inky_to_html`` filter was added in Twig 2.12.
|
||||
|
||||
The ``inky`` filter processes an `inky email template
|
||||
The ``inky_to_html`` filter processes an `inky email template
|
||||
<https://github.com/zurb/inky>`_:
|
||||
|
||||
.. code-block:: twig
|
||||
|
||||
{% apply inky %}
|
||||
{% apply inky_to_html %}
|
||||
<row>
|
||||
<columns large="6"></columns>
|
||||
<columns large="6"></columns>
|
||||
@@ -20,11 +20,11 @@ You can also use the filter on an included file:
|
||||
|
||||
.. code-block:: twig
|
||||
|
||||
{{ include('some_template.inky.twig')|inky }}
|
||||
{{ include('some_template.inky.twig')|inky_to_html }}
|
||||
|
||||
.. note::
|
||||
|
||||
The ``inky`` filter is part of the ``CssInlinerExtension`` which is not
|
||||
The ``inky_to_html`` filter is part of the ``CssInlinerExtension`` which is not
|
||||
installed by default. Install it first:
|
||||
|
||||
.. code-block:: bash
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
"inky" filter
|
||||
"inline_css" filter
|
||||
--TEMPLATE--
|
||||
{% apply inline_css|spaceless %}
|
||||
<html>
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
namespace Twig\Extra\Inky;
|
||||
|
||||
use Pinky;
|
||||
use Twig\Error\RuntimeError;
|
||||
use Twig\Extension\AbstractExtension;
|
||||
use Twig\TwigFilter;
|
||||
|
||||
@@ -21,7 +20,7 @@ class InkyExtension extends AbstractExtension
|
||||
public function getFilters()
|
||||
{
|
||||
return [
|
||||
new TwigFilter('inky', 'Twig\\Extra\\Inky\\twig_inky', ['is_safe' => ['html']]),
|
||||
new TwigFilter('inky_to_html', 'Twig\\Extra\\Inky\\twig_inky', ['is_safe' => ['html']]),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--TEST--
|
||||
"inky" filter
|
||||
"inky_to_html" filter
|
||||
--TEMPLATE--
|
||||
{% apply inky %}
|
||||
{% apply inky_to_html %}
|
||||
<container class="extra">{{ var }}</container>
|
||||
{%- endapply %}
|
||||
|
||||
{{ include("inky")|inky }}
|
||||
{{ include("inky")|inky_to_html }}
|
||||
--TEMPLATE(inky)--
|
||||
<container class="extra">{{ var }}</container>
|
||||
--DATA--
|
||||
|
||||
@@ -61,7 +61,7 @@ final class Extensions
|
||||
'class' => InkyExtension::class,
|
||||
'class_name' => 'InkyExtension',
|
||||
'package' => 'twig/inky-extra',
|
||||
'filters' => ['inky'],
|
||||
'filters' => ['inky_to_html'],
|
||||
'functions' => [],
|
||||
],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user