/** * Compiles an incident template into an incident message. * * @param string $templateSlug * @param array $vars * * @return string */ protected function parseIncidentTemplate($templateSlug, $vars) { if ($vars === null) { $vars = []; } $this->twig->setLoader(new Twig_Loader_String()); $template = IncidentTemplate::forSlug($templateSlug)->first(); return $this->twig->render($template->template, $vars); }
/** * Renders a route with variables * * @param string $name * @param array $context * @return bool|string */ public function render($name, array $context = array()) { $view = $this->getViewName($name, false); return parent::render($view, $context); }