]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Repository/EntryRepository.php
Add reload entry command
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Repository / EntryRepository.php
index d70d6ca6056d7e96b5445658326f809504694a26..9a30cd790e80091891cf4e8264e5747ffd7cd546 100644 (file)
@@ -364,6 +364,23 @@ class EntryRepository extends EntityRepository
         return $qb->getQuery()->getArrayResult();
     }
 
+    /**
+     * @param int $userId
+     *
+     * @return array
+     */
+    public function getAllEntriesId($userId = null)
+    {
+        $qb = $this->createQueryBuilder('e')
+            ->select('e.id');
+
+        if (null !== $userId) {
+            $qb->where('e.user = :userid')->setParameter(':userid', $userId);
+        }
+
+        return $qb->getQuery()->getArrayResult();
+    }
+
     /**
      * Find all entries by url and owner.
      *