create example for mail usage

This commit is contained in:
Manuel Raynaud
2013-10-21 18:04:48 +02:00
parent 1f55d569ef
commit 4236a16e49
3 changed files with 66 additions and 0 deletions

View File

@@ -303,4 +303,17 @@ class BaseController extends ContainerAware
return $mailer->getSwiftMailer();
}
/**
* @return ParserInterface instance parser
*/
protected function getParser()
{
return $this->container->get("thelia.parser");
}
protected function render($inline)
{
return $this->getParser()->fetch(sprintf("string:%s", $inline));
}
}