• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/mail/eventmessagethemecompiler.php
  • Класс: BitrixMainMailEventMessageThemeCompiler
  • Вызов: EventMessageThemeCompiler::setTheme
protected function setTheme($site_template_id)
{
	if($site_template_id <> '')
	{
		$result = CSiteTemplate::GetByID($site_template_id);
		if($templateFields = $result->Fetch())
		{
			$this->themePath = $templateFields['PATH'];
			$template_path_header = BitrixMainApplication::getDocumentRoot().$templateFields['PATH'].'/header.php';
			$template_path_footer = BitrixMainApplication::getDocumentRoot().$templateFields['PATH'].'/footer.php';
			if($templateFields['PATH']!='' && IOFile::isFileExists($template_path_footer)  && IOFile::isFileExists($template_path_header))
			{
				$this->themeStylesString .= $templateFields['TEMPLATE_STYLES']."rn";
				$this->themeStylesString .= $templateFields['STYLES']."rn";

				$this->setThemeProlog(IOFile::getFileContents($template_path_header));
				$this->setThemeEpilog(IOFile::getFileContents($template_path_footer));
			}
		}
	}
}