CAllCrmActivity::fetchActivityPingOffsets

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmActivity
  4. fetchActivityPingOffsets
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_activity.php
  • Класс: \CAllCrmActivity
  • Вызов: CAllCrmActivity::fetchActivityPingOffsets
static function fetchActivityPingOffsets(array $arFields): array
{
	$arPingOffsets = isset($arFields['PING_OFFSETS']) && is_array($arFields['PING_OFFSETS'])
		? $arFields['PING_OFFSETS']
		: null;
	if (is_null($arPingOffsets))
	{
		$provider = self::GetActivityProvider($arFields);
		if ($provider !== null)
		{
			$categoryId = Container::getInstance()->getFactory($arFields['OWNER_TYPE_ID'])?->getItemCategoryId($arFields['OWNER_ID']);
			$arPingOffsets = $provider::getDefaultPingOffsets(
				[
					'entityTypeId' => (int)$arFields['OWNER_TYPE_ID'],
					'categoryId' => (int)($categoryId ?? 0),
				]
			);
		}
	}

	return $arPingOffsets;
}

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