2017 © Pedro Peláez
 

library twig-swift-message

Provides a Swift_Message builder using twig.

image

cethyworks/twig-swift-message

Provides a Swift_Message builder using twig.

  • Tuesday, August 15, 2017
  • by Cethy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 201 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

Cethyworks/TwigSwiftMessage

Build Swift_Messages with twig and optionally inline the css with CssToInlineStyles., (*1)

CircleCI, (*2)

Install

1. Composer require, (*3)

$ 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)., (*4)

{% 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(), (*5)

/** @var Swift_Message $swiftMessage */
$swiftMessage = $messageBuilder->buildMessage($templateName, $templateParameters);

3. Add your recipient(s). And sent it !, (*6)

The Versions

15/08 2017

dev-master

9999999-dev

Provides a Swift_Message builder using twig.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Charles-Elie

15/08 2017

v2.0

2.0.0.0

Provides a Swift_Message builder using twig.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Charles-Elie

21/07 2017

v1.0

1.0.0.0

Provides a Swift_Message builder using twig.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Charles-Elie