/** * @param $xml * @return null|string */ protected function getTemplateContent($xml) { $content = $this->blockParser->getBlockTemplateString($xml); if ($content === null) { $template = $this->template->setView(self::class)->getTemplateFilePath('Block'); $content = file_get_contents($template); } return $content; }