• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/recurring/mail.php
  • Класс: Bitrix\Crm\Recurring\Mail
  • Вызов: Mail::fillMessageBody
protected function fillMessageBody($invoice)
{
	$body = isset($this->templateData['BODY']) ? (string)($this->templateData['BODY']) : '';
	if (!empty($body))
	{
		if (\CCrmContentType::BBCode === $this->templateData['BODY_TYPE'])
		{
			$bbCodeParser = new \CTextParser();
			$body = $bbCodeParser->convertText($body);
		}

		$body = \CCrmTemplateManager::prepareTemplate(
			$body,
			\CCrmOwnerType::Invoice, $invoice['ID'],
			\CCrmContentType::Html,
			$invoice['RESPONSIBLE_ID']
		);
	}

	\CCrmActivity::AddEmailSignature($body, \CCrmContentType::BBCode);

	if (empty($body))
	{
		$body = Loc::getMessage('CRM_RECUR_EMPTY_BODY_MESSAGE');
	}

	return $body;
}