Template helpers refactoring

This commit is contained in:
Frédéric Guillot
2014-12-28 11:28:50 -05:00
parent 88d84073ae
commit 34d7450d3c
155 changed files with 1605 additions and 1609 deletions

View File

@@ -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'))
);
}
/**