CAllCrmActivity::EnrichWithNotRemovableBindings

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmActivity
  4. EnrichWithNotRemovableBindings
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_activity.php
  • Класс: \CAllCrmActivity
  • Вызов: CAllCrmActivity::EnrichWithNotRemovableBindings
static function EnrichWithNotRemovableBindings($id, &$arOwnerData): void
{
	$existedBindings = self::GetBindings($id);
	foreach ($existedBindings as $i => $binding)
	{
		if (
			(int)$binding['OWNER_TYPE_ID'] === \CCrmOwnerType::Deal
			|| CCrmOwnerType::IsClient($binding['OWNER_TYPE_ID'])
		)
		{
			unset($existedBindings[$i]);
			continue;
		}
		$existedBindings[$i]['OWNER_TYPE_NAME'] = CCrmOwnerType::ResolveName($binding['OWNER_TYPE_ID']);
	}
	$arOwnerData = array_merge($arOwnerData, array_values($existedBindings));
}

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