CCrmActivityDbResult::appendLightTimeFieldToRecords

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmActivityDbResult
  4. appendLightTimeFieldToRecords
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_activity_db_result.php
  • Класс: \CCrmActivityDbResult
  • Вызов: CCrmActivityDbResult::appendLightTimeFieldToRecords
private function appendLightTimeFieldToRecords(array $records): array
{
	/** @var ActCounterLightTimeRepo $lightCounterRepo */
	$lightCounterRepo = ServiceLocator::getInstance()->get('crm.activity.actcounterlighttimerepo');
	$ids = array_column($records, 'ID');

	$arrLightTimeAt = $lightCounterRepo->queryLightTimeByActivityIds($ids);

	foreach ($records as &$record)
	{
		$actId = $record['ID'];
		$record['LIGHT_COUNTER_AT'] = $arrLightTimeAt[$actId] ?? null;
	}
	return $records;
}

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