Browse Source

1. getBySortableGroupsQuery() renamed to getBySortableGroupsQueryBuilder() that returns the QueryBuilder instance now
2. implemented new getBySortableGroupsQuery() that uses getBySortableGroupsQueryBuilder() to return the query

toaotc 13 years ago
parent
commit
7cfd938b20
1 changed files with 6 additions and 1 deletions
  1. 6 1
      lib/Gedmo/Sortable/Entity/Repository/SortableRepository.php

+ 6 - 1
lib/Gedmo/Sortable/Entity/Repository/SortableRepository.php

@@ -44,6 +44,11 @@ class SortableRepository extends EntityRepository
     }
     
     public function getBySortableGroupsQuery(array $groupValues=array())
+    {
+        return $this->getBySortableGroupsQueryBuilder($groupValues)->getQuery();
+    }
+    
+    public function getBySortableGroupsQueryBuilder(array $groupValues=array())
     {
         $groups = array_combine(array_values($this->config['groups']), array_keys($this->config['groups']));
         foreach ($groupValues as $name => $value) {
@@ -65,7 +70,7 @@ class SortableRepository extends EntityRepository
                ->setParameter('group'.$i, $value);
             $i++;
         }
-        return $qb->getQuery();
+        return $qb;
     }
     
     public function getBySortableGroups(array $groupValues=array())