From 34d7450d3c13342715e90ec21bceaa13e1baa876 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 28 Dec 2014 11:28:50 -0500 Subject: Template helpers refactoring --- app/Model/Notification.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/Model/Notification.php') diff --git a/app/Model/Notification.php b/app/Model/Notification.php index 0fa4c9da..99db78ad 100644 --- a/app/Model/Notification.php +++ b/app/Model/Notification.php @@ -3,7 +3,6 @@ namespace Model; use Core\Session; -use Core\Template; use Swift_Message; use Swift_Mailer; use Swift_TransportException; @@ -184,8 +183,10 @@ class Notification extends Base */ public function getMailContent($template, array $data) { - $tpl = new Template; - return $tpl->load('notification/'.$template, $data + array('application_url' => $this->config->get('application_url'))); + return $this->template->render( + 'notification/'.$template, + $data + array('application_url' => $this->config->get('application_url')) + ); } /** -- cgit v1.2.3