BaseMessage::bindBadge

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. BaseMessage
  4. bindBadge
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/activity/provider/basemessage.php
  • Класс: Bitrix\Crm\Activity\Provider\BaseMessage
  • Вызов: BaseMessage::bindBadge
static function bindBadge(int $activityId, string $badgeItemValue, array $bindings): void
{
	$badge = Container::getInstance()->getBadge(Badge\Badge::SMS_STATUS_TYPE, $badgeItemValue);
	$sourceIdentifier = new Badge\SourceIdentifier(
		Badge\SourceIdentifier::CRM_OWNER_TYPE_PROVIDER,
		CCrmOwnerType::Activity,
		$activityId,
	);

	foreach ($bindings as $singleBinding)
	{
		$itemIdentifier = new ItemIdentifier((int)$singleBinding['OWNER_TYPE_ID'], (int)$singleBinding['OWNER_ID']);
		$badge->bind($itemIdentifier, $sourceIdentifier);
	}
}

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