CounterCalculatedTimeTable::getCalculatedAt

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CounterCalculatedTimeTable
  4. getCalculatedAt
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/counter/countercalculatedtimetable.php
  • Класс: Bitrix\Crm\Counter\CounterCalculatedTimeTable
  • Вызов: CounterCalculatedTimeTable::getCalculatedAt
static function getCalculatedAt(int $userId, string $code): int
{
	$result = self::query()
		->setSelect(['CALCULATED_AT'])
		->where('USER_ID', $userId)
		->where( 'CODE',  $code)
		->setCacheTtl(3600)
		->fetch();

	return $result
		? $result['CALCULATED_AT']->getTimestamp()
		: 0;
}

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