src/Queries/D7Query.php
protected function loadModels()
    {
        $params = [
            'select' => $this->select,
            'filter' => $this->filter,
            'group' => $this->group,
            'order' => $this->sort,
            'limit' => $this->limit,
            'offset' => $this->offset,
            'runtime' => $this->runtime,
        ];

        if ($this->cacheTtl && $this->cacheJoins) {
            $params['cache'] = ['ttl' => $this->cacheTtl, 'cache_joins' => true];
        }

        $className = $this->bxObject->getClassName();
        $queryType = 'D7Query::getList';
        $keyBy = $this->keyBy;

        $callback = function () use ($className, $params) {
            $rows = [];
            $result = $this->bxObject->getList($params);
            while ($row = $result->fetch()) {
                $this->addItemToResultsUsingKeyBy($rows, new $this->modelName($row['ID'], $row));
            }

            return new Collection($rows);
        };

        return $this->handleCacheIfNeeded(compact('className', 'params', 'queryType', 'keyBy'), $callback);
    }
protected function loadModels()
    {
        $params = [
            'select' => $this->select,
            'filter' => $this->filter,
            'group' => $this->group,
            'order' => $this->sort,
            'limit' => $this->limit,
            'offset' => $this->offset,
            'runtime' => $this->runtime,
        ];

        if ($this->cacheTtl && $this->cacheJoins) {
            $params['cache'] = ['ttl' => $this->cacheTtl, 'cache_joins' => true];
        }

        $className = $this->bxObject->getClassName();
        $queryType = 'D7Query::getList';
        $keyBy = $this->keyBy;

        $callback = function () use ($className, $params) {
            $rows = [];
            $result = $this->bxObject->getList($params);
            while ($row = $result->fetch()) {
                $this->addItemToResultsUsingKeyBy($rows, new $this->modelName($row['ID'], $row));
            }

            return new Collection($rows);
        };

        return $this->handleCacheIfNeeded(compact('className', 'params', 'queryType', 'keyBy'), $callback);
    }
protected function loadModels ( ) { $ params = [ 'select' => $ this -> select , 'filter' => $ this -> filter , 'group' => $ this -> group , 'order' => $ this -> sort , 'limit' => $ this -> limit , 'offset' => $ this -> offset , 'runtime' => $ this -> runtime , ] ; if ( $ this -> cacheTtl && $ this -> cacheJoins ) { $ params [ 'cache' ] = [ 'ttl' => $ this -> cacheTtl , 'cache_joins' => true ] ; } $ className = $ this -> bxObject -> getClassName ( ) ; $ queryType = 'D7Query::getList' ; $ keyBy = $ this -> keyBy ; $ callback = function ( ) use ( $ className , $ params ) { $ rows = [ ] ; $ result = $ this -> bxObject -> getList ( $ params ) ; while ( $ row = $ result -> fetch ( ) ) { $ this -> addItemToResultsUsingKeyBy ( $ rows , new $ this -> modelName ( $ row [ 'ID' ] , $ row ) ) ; } return new Collection ( $ rows ) ; } ; return $ this -> handleCacheIfNeeded ( compact ( 'className' , 'params' , 'queryType' , 'keyBy' ) , $ callback ) ; }
Get list of items.

@return Collection
Get list of items .