/** {@inheritdoc} */ public function showFront(Curry_Twig_Template $template = null) { $twig = $this->toTwig(); return $template ? $template->render($twig) : $twig['content']; }
/** * This function will be called when rendering a module. By default a * template is required, and it will be rendered using the results from * the toTwig() function. * * @param Curry_Twig_Template|null $template * @return string The content generated by the module. */ public function showFront(Curry_Twig_Template $template = null) { if (!$template) { throw new Exception('A template is required for this module (' . get_class($this) . ').'); } return $template->render($this->toTwig()); }