• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/preset.php
  • Класс: Bitrix\Crm\PresetTable
  • Вызов: PresetTable::getCountByFilter
static function getCountByFilter($filter = array())
{
	$params = array(
		'runtime' => array(
			'CNT' => array(
				'data_type' => 'integer',
				'expression' => array('COUNT(*)')
			)
		),
		'select' => array('CNT')
	);

	if(is_array($filter))
		$params['filter'] = $filter;

	$res = static::getList($params)->fetch();

	return intval($res['CNT']);
}