• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/provider/taskprovider.php
  • Класс: BitrixTasksProviderTaskProvider
  • Вызов: TaskProvider::executeQuery
private function executeQuery(): CDBResult
{
	if (
		is_array($this->arParams)
		&& array_key_exists('NAV_PARAMS', $this->arParams)
		&& is_array($this->arParams['NAV_PARAMS'])
	)
	{
		$nTopCount = (int)($this->arParams['NAV_PARAMS']['nTopCount'] ?? 0);
		if ($nTopCount > 0)
		{
			$res = $this->executeTopQuery($nTopCount);
		}
		elseif (is_numeric($this->nPageTop))
		{
			$res = $this->executeTopQuery($this->nPageTop);
		}
		elseif (
			array_key_exists('nPageSize', $this->arParams['NAV_PARAMS'])
			&& array_key_exists('iNumPage', $this->arParams['NAV_PARAMS'])
			&& !array_key_exists('getTotalCount', $this->arParams['NAV_PARAMS'])
		)
		{
			$res = $this->executeLimitOffsetQuery();
		}
		else
		{
			$res = $this->executeLimitQuery();
		}
	}
	else
	{
		$res = $this->executeNonLimitQuery();
	}

	return $res;
}