Renders the template with the given context and returns it as string.
array $context An array of parameters to pass to the template:
string The rendered template
Overrides Twig_TemplateInterface::render
public function render(array $context) {
$level = ob_get_level();
ob_start();
try {
$this
->display($context);
} catch (Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}