Download the PHP package cethyworks/twig-swift-message without Composer
On this page you can find all versions of the php package cethyworks/twig-swift-message. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download cethyworks/twig-swift-message
More information about cethyworks/twig-swift-message
Files in cethyworks/twig-swift-message
Download cethyworks/twig-swift-message
More information about cethyworks/twig-swift-message
Files in cethyworks/twig-swift-message
Vendor cethyworks
Package twig-swift-message
Short Description Provides a Swift_Message builder using twig.
License MIT
Package twig-swift-message
Short Description Provides a Swift_Message builder using twig.
License MIT
Please rate this library. Is it a good library?
Informations about the package twig-swift-message
Cethyworks/TwigSwiftMessage
Build Swift_Message
s with twig and optionally inline the css with CssToInlineStyles.
Install
1. Composer require
$ composer require cethyworks/twig-swift-message
How to use
1. Create your twig template using the 3 blocks subject
, body_html
and/or body_txt
(all blocks are optional).
{% block subject %}subject{% endblock subject %}
{% block style %}.baz {color:red;}{% endblock style %}
{% block body_html %}
{{ foo }}<br>
<p class="baz">bar</p>
{% endblock body_html %}
{% block body_txt %}
{{ foo }}
bar
{% endblock body_txt %}
2. Call TwigSwiftMessageBuilder::buildMessage()
/** @var Swift_Message $swiftMessage */
$swiftMessage = $messageBuilder->buildMessage($templateName, $templateParameters);
3. Add your recipient(s). And sent it !
All versions of twig-swift-message with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.6.17
twig/twig Version ^1.0||^2.0
swiftmailer/swiftmailer Version ^5.3|^6.0
tijsverkoyen/css-to-inline-styles Version ^2.2
twig/twig Version ^1.0||^2.0
swiftmailer/swiftmailer Version ^5.3|^6.0
tijsverkoyen/css-to-inline-styles Version ^2.2
The package cethyworks/twig-swift-message contains the following files
Loading the files please wait ....