]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Repository/EntryRepository.php
MOAR WIP
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Repository / EntryRepository.php
index 9bda4e15e81fcfd8d7e33635607fefa7db01c723..ade3d6bcad28ccad15971a6bade77d951bc272e2 100644 (file)
@@ -414,4 +414,17 @@ class EntryRepository extends EntityRepository
             ->getQuery()
             ->getResult();
     }
+
+    /**
+     * Find all entries for a group
+     *
+     * @param $groupId
+     * @return \Doctrine\ORM\QueryBuilder
+     */
+    public function findByGroup($groupId)
+       {
+               return $this->createQueryBuilder('p')
+                       ->innerJoin('p.groupShares', 'g', 'WITH', 'g.id = :group')
+                       ->setParameter(':group', $groupId);
+       }
 }