CAllCrmLead::GetTotalCount

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmLead
  4. GetTotalCount
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_lead.php
  • Класс: \CAllCrmLead
  • Вызов: CAllCrmLead::GetTotalCount
static function GetTotalCount()
{
	if(defined('BX_COMP_MANAGED_CACHE') && $GLOBALS['CACHE_MANAGER']->Read(self::CACHE_TTL, self::TOTAL_COUNT_CACHE_ID, 'b_crm_lead'))
	{
		return $GLOBALS['CACHE_MANAGER']->Get(self::TOTAL_COUNT_CACHE_ID);
	}

	$result = (int)self::GetListEx(
		array(),
		array('CHECK_PERMISSIONS' => 'N'),
		array(),
		false,
		array(),
		array('ENABLE_ROW_COUNT_THRESHOLD' => false)
	);

	if(defined('BX_COMP_MANAGED_CACHE'))
	{
		$GLOBALS['CACHE_MANAGER']->Set(self::TOTAL_COUNT_CACHE_ID, $result);
	}
	return $result;
}

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