public function getParsedTemplate()
{
if (isset($this->templateParser)) {
// Note: this is for compatibility with Standalone Fluid as base;
// this package no longer requires this initialisation when rendering sections.
$templateIdentifier = $this->getTemplateIdentifier();
if (TRUE === $this->templateCompiler->has($templateIdentifier)) {
$parsedTemplate = $this->templateCompiler->get($templateIdentifier);
} else {
$source = $this->getTemplateSource();
$parsedTemplate = $this->templateParser->parse($source);
if (TRUE === $parsedTemplate->isCompilable()) {
$this->templateCompiler->store($templateIdentifier, $parsedTemplate);
}
}
} else {
$parsedTemplate = $this->baseRenderingContext->getTemplateParser()->parse($this->baseRenderingContext->getTemplatePaths()->getTemplateSource());
}
return $parsedTemplate;
}