Entity/EntityRepository.php
protected function getQueryBuilder(array $filters = [], array $sorting = [])
    {
        $queryBuilder = $this->getBaseQueryBuilder();
        if (!empty($filters)) {
            $this->addFilters($queryBuilder, $filters);
        }

        if (empty($sorting)) {
            $this->addSorting($queryBuilder, $this->getDefaultSorting());
        } else {
            $this->addSorting($queryBuilder, $sorting);
        }

        return $queryBuilder;
    }
protected function getQueryBuilder(array $filters = [], array $sorting = [])
    {
        $queryBuilder = $this->getBaseQueryBuilder();
        if (!empty($filters)) {
            $this->addFilters($queryBuilder, $filters);
        }

        if (empty($sorting)) {
            $this->addSorting($queryBuilder, $this->getDefaultSorting());
        } else {
            $this->addSorting($queryBuilder, $sorting);
        }

        return $queryBuilder;
    }
protected function getQueryBuilder ( array $ filters = [ ] , array $ sorting = [ ] ) { $ queryBuilder = $ this -> getBaseQueryBuilder ( ) ; if ( ! empty ( $ filters ) ) { $ this -> addFilters ( $ queryBuilder , $ filters ) ; } if ( empty ( $ sorting ) ) { $ this -> addSorting ( $ queryBuilder , $ this -> getDefaultSorting ( ) ) ; } else { $ this -> addSorting ( $ queryBuilder , $ sorting ) ; } return $ queryBuilder ; }
Returns a complete QueryBuilder instance for the current entity.

@param array $filters
@param array $sorting
@return \Doctrine\ORM\QueryBuilder
Returns a complete QueryBuilder instance for the current entity .