• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/counter/entitycounter.php
  • Класс: Bitrix\Crm\Counter\EntityCounter
  • Вызов: EntityCounter::prepareQueries
private function prepareQueries(array $options = null)
{
	if(is_array($options) && isset($options['USER_IDS']) && is_array($options['USER_IDS']))
	{
		$userIDs = $options['USER_IDS'];
	}
	else
	{
		$userIDs = [$this->userID];
	}
	$categoryId = $this->getIntegerExtraParam(
		'DEAL_CATEGORY_ID',
		$this->getIntegerExtraParam('CATEGORY_ID', null)
	);
	if (!is_null($categoryId) && $categoryId >= 0)
	{
		$options['CATEGORY_ID'] = $categoryId;
	}
	if ($this->getBoolExtraParam('EXCLUDE_USERS'))
	{
		$options['EXCLUDE_USERS'] = true;
	}

	return $this->prepareEntityQueries($this->entityTypeID, $this->typeID, $userIDs, $options);
}