Skip to content

Commit

Permalink
MInor to CS
Browse files Browse the repository at this point in the history
  • Loading branch information
kuzmany committed Mar 8, 2019
1 parent 2349609 commit 664d55f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions EventListener/EmailSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ public function onEmailGenerate(Events\EmailSendEvent $event)
{
$this->logger->info('onEmailGenerate MauticAdvancedTemplatesBundle\EmailSubscriber');
$content = $event->getContent();
$content .= "
{% TWIG_BLOCK %}
{% set items = 'http://mautic.test/feed.rss' | rss('segments') %}
<ul>
{% for item in items %}
<li>
<a href=''{{ item.link }}'>{{ item.title }}</a> ({{ item.pubDate|date('m/d/Y') }})
<br />{{ item.description|raw }}
</li>
{% endfor %}
</ul>
{% END_TWIG_BLOCK %}
";
$content = $this->templateProcessor->processTemplate($content, $event->getLead());
$event->setContent($content);
}
Expand Down

0 comments on commit 664d55f

Please sign in to comment.