Ver código fonte

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

toaotc 13 anos atrás
pai
commit
7cfd938b20

+ 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())