src/Queries/ElementQuery.php
protected function loadModels()
    {
        $sort = $this->sort;
        $filter = $this->normalizeFilter();
        $groupBy = $this->groupBy;
        $navigation = $this->navigation;
        $select = $this->normalizeSelect();
        $queryType = 'ElementQuery::getList';
        $fetchUsing = $this->fetchUsing;
        $keyBy = $this->keyBy;
        list($select, $chunkQuery) = $this->multiplySelectForMaxJoinsRestrictionIfNeeded($select);

        $callback = function() use ($sort, $filter, $groupBy, $navigation, $select, $chunkQuery) {
            if ($chunkQuery) {
                $itemsChunks = [];
                foreach ($select as $chunkIndex => $selectForChunk) {
                    $rsItems = $this->bxObject->GetList($sort, $filter, $groupBy, $navigation, $selectForChunk);
                    while ($arItem = $this->performFetchUsingSelectedMethod($rsItems)) {
                        $this->addItemToResultsUsingKeyBy($itemsChunks[$chunkIndex], new $this->modelName($arItem['ID'], $arItem));
                    }
                }

                $items = $this->mergeChunks($itemsChunks);
            } else {
                $items = [];
                $rsItems = $this->bxObject->GetList($sort, $filter, $groupBy, $navigation, $select);
                while ($arItem = $this->performFetchUsingSelectedMethod($rsItems)) {
                    $this->addItemToResultsUsingKeyBy($items, new $this->modelName($arItem['ID'], $arItem));
                }
            }
            return new Collection($items);
        };

        $cacheKeyParams = compact('sort', 'filter', 'groupBy', 'navigation', 'select', 'queryType', 'keyBy', 'fetchUsing');

        return $this->handleCacheIfNeeded($cacheKeyParams, $callback);
    }
protected function loadModels()
    {
        $sort = $this->sort;
        $filter = $this->normalizeFilter();
        $groupBy = $this->groupBy;
        $navigation = $this->navigation;
        $select = $this->normalizeSelect();
        $queryType = 'ElementQuery::getList';
        $fetchUsing = $this->fetchUsing;
        $keyBy = $this->keyBy;
        list($select, $chunkQuery) = $this->multiplySelectForMaxJoinsRestrictionIfNeeded($select);

        $callback = function() use ($sort, $filter, $groupBy, $navigation, $select, $chunkQuery) {
            if ($chunkQuery) {
                $itemsChunks = [];
                foreach ($select as $chunkIndex => $selectForChunk) {
                    $rsItems = $this->bxObject->GetList($sort, $filter, $groupBy, $navigation, $selectForChunk);
                    while ($arItem = $this->performFetchUsingSelectedMethod($rsItems)) {
                        $this->addItemToResultsUsingKeyBy($itemsChunks[$chunkIndex], new $this->modelName($arItem['ID'], $arItem));
                    }
                }

                $items = $this->mergeChunks($itemsChunks);
            } else {
                $items = [];
                $rsItems = $this->bxObject->GetList($sort, $filter, $groupBy, $navigation, $select);
                while ($arItem = $this->performFetchUsingSelectedMethod($rsItems)) {
                    $this->addItemToResultsUsingKeyBy($items, new $this->modelName($arItem['ID'], $arItem));
                }
            }
            return new Collection($items);
        };

        $cacheKeyParams = compact('sort', 'filter', 'groupBy', 'navigation', 'select', 'queryType', 'keyBy', 'fetchUsing');

        return $this->handleCacheIfNeeded($cacheKeyParams, $callback);
    }
Get list of items.

@return Collection