protected function renderTwigTemplate()
{
try {
$output = $this->twig->render($this->getTemplateFile(), $this->getTemplateVars());
} catch (Exception $ex) {
// twig does not rethrow exceptions, it wraps them so we log the cause if we can find it
$cause = $ex->getPrevious();
Log::debug($cause === null ? $ex : $cause);
throw $ex;
}
if ($this->enableCacheBuster) {
$output = $this->applyFilter_cacheBuster($output);
}
$helper = new Theme();
$output = $helper->rewriteAssetsPathToTheme($output);
return $output;
}