Provider/EntityProvider.php
public function setQueryParams($id, $params = [])
    {
        $requestQuery = $this->request->query->get('query_id');
        
        if(isset($requestQuery[$id])) {
            $paramsQuery = $requestQuery[$id];
        } elseif(isset($params['query'])) {
            $paramsQuery = $params['query'];
        } else {
            $paramsQuery = [];
        }
        
        $query = array_merge([
            'limit' => null,
            'offset' => null,
            'orderby' => null,
            'order' => null
        ], $paramsQuery);
        
        if($query['offset'] !== null && $query['offset'] >= $this->paramDefaults['offset']) {
            $this->qb->setFirstResult($query['offset']);
        }
        
        if($query['limit'] !== null && $query['limit'] >= $this->paramDefaults['limit']) {
            $this->qb->setMaxResults($query['limit']);
        }
        
        if(in_array($query['orderby'], $this->paramDefaults['orderby'])) {
            $order = in_array(strtoupper($query['order']), $this->paramDefaults['order']) ? $query['order'] : $this->paramDefaults['order'][0];

            $this->qb->orderBy('a.'.Inflector::camelize($query['orderby']), strtoupper($order));
        }
    }
public function setQueryParams($id, $params = [])
    {
        $requestQuery = $this->request->query->get('query_id');
        
        if(isset($requestQuery[$id])) {
            $paramsQuery = $requestQuery[$id];
        } elseif(isset($params['query'])) {
            $paramsQuery = $params['query'];
        } else {
            $paramsQuery = [];
        }
        
        $query = array_merge([
            'limit' => null,
            'offset' => null,
            'orderby' => null,
            'order' => null
        ], $paramsQuery);
        
        if($query['offset'] !== null && $query['offset'] >= $this->paramDefaults['offset']) {
            $this->qb->setFirstResult($query['offset']);
        }
        
        if($query['limit'] !== null && $query['limit'] >= $this->paramDefaults['limit']) {
            $this->qb->setMaxResults($query['limit']);
        }
        
        if(in_array($query['orderby'], $this->paramDefaults['orderby'])) {
            $order = in_array(strtoupper($query['order']), $this->paramDefaults['order']) ? $query['order'] : $this->paramDefaults['order'][0];

            $this->qb->orderBy('a.'.Inflector::camelize($query['orderby']), strtoupper($order));
        }
    }
public function setQueryParams ( $ id , $ params = [ ] ) { $ requestQuery = $ this -> request -> query -> get ( 'query_id' ) ; if ( isset ( $ requestQuery [ $ id ] ) ) { $ paramsQuery = $ requestQuery [ $ id ] ; } elseif ( isset ( $ params [ 'query' ] ) ) { $ paramsQuery = $ params [ 'query' ] ; } else { $ paramsQuery = [ ] ; } $ query = array_merge ( [ 'limit' => null , 'offset' => null , 'orderby' => null , 'order' => null ] , $ paramsQuery ) ; if ( $ query [ 'offset' ] !== null && $ query [ 'offset' ] >= $ this -> paramDefaults [ 'offset' ] ) { $ this -> qb -> setFirstResult ( $ query [ 'offset' ] ) ; } if ( $ query [ 'limit' ] !== null && $ query [ 'limit' ] >= $ this -> paramDefaults [ 'limit' ] ) { $ this -> qb -> setMaxResults ( $ query [ 'limit' ] ) ; } if ( in_array ( $ query [ 'orderby' ] , $ this -> paramDefaults [ 'orderby' ] ) ) { $ order = in_array ( strtoupper ( $ query [ 'order' ] ) , $ this -> paramDefaults [ 'order' ] ) ? $ query [ 'order' ] : $ this -> paramDefaults [ 'order' ] [ 0 ] ; $ this -> qb -> orderBy ( 'a.' . Inflector :: camelize ( $ query [ 'orderby' ] ) , strtoupper ( $ order ) ) ; } }
Update query builder to include additional parameters

@param integer $id
@param array $params
Update query builder to include additional parameters