• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sharing/crm/activitymanager.php
  • Класс: BitrixCalendarSharingCrmActivityManager
  • Вызов: ActivityManager::getBindings
private function getBindings(): array
{
	$result = [];
	$entityTypeId = null;

	switch ($this->link->getObjectType())
	{
		case Helper::CRM_DEAL_SHARING_TYPE:
			$entityTypeId = CCrmOwnerType::Deal;
			break;
	}

	$result[] = [
		'OWNER_TYPE_ID' => $entityTypeId,
		'OWNER_ID' => $this->link->getObjectId(),
	];

	if ($this->link->getContactType() && $this->link->getContactId())
	{
		$result[] = [
			'OWNER_TYPE_ID' => $this->link->getContactType(),
			'OWNER_ID' => $this->link->getContactId(),
		];
	}

	return $result;
}