Email::compressActivity

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Email
  4. compressActivity
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/activity/provider/email.php
  • Класс: Bitrix\Crm\Activity\Provider\Email
  • Вызов: Email::compressActivity
static function compressActivity(array &$activity): void
{
	$activity['PROVIDER_ID'] = Crm\Activity\Provider\Email::getId();
	$activity['PROVIDER_TYPE_ID'] = self::TYPE_EMAIL_COMPRESSED;

	$bodyId = Crm\Activity\MailBodyTable::addByBody($activity['DESCRIPTION'] ?? '');

	$description = [
		'DESCRIPTION' => $activity['DESCRIPTION'],
		'DESCRIPTION_TYPE' => $activity['DESCRIPTION_TYPE']
	];

	\CCrmActivity::PrepareDescriptionFields(
		$description,
		[
			'ENABLE_HTML' => false,
			'ENABLE_BBCODE' => false,
			'LIMIT' => 200,
		]
	);

	$activity['DESCRIPTION'] = $description['DESCRIPTION_RAW'];
	//$activity['DESCRIPTION_TYPE'] = \CCrmContentType::PlainText;
	$activity['ASSOCIATED_ENTITY_ID'] = $bodyId;
}

Добавить комментарий