aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/EntryRepository.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index ca71970b..502e9da0 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -223,4 +223,21 @@ class EntryRepository extends EntityRepository
223 ->getQuery() 223 ->getQuery()
224 ->getResult(); 224 ->getResult();
225 } 225 }
226
227 /**
228 * Find an entry by its url and its owner.
229 *
230 * @param $url
231 * @param $userId
232 *
233 * @return array
234 */
235 public function findOneByUrlAndUserId($url, $userId)
236 {
237 return $this->createQueryBuilder('e')
238 ->where('e.url = :url')->setParameter('url', $url)
239 ->andWhere('e.user = :user_id')->setParameter('user_id', $userId)
240 ->getQuery()
241 ->getResult();
242 }
226} 243}