diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 7f35bb9a..d70d6ca6 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -330,26 +330,6 @@ class EntryRepository extends EntityRepository | |||
330 | } | 330 | } |
331 | 331 | ||
332 | /** | 332 | /** |
333 | * Count all entries for a tag and a user. | ||
334 | * | ||
335 | * @param int $userId | ||
336 | * @param int $tagId | ||
337 | * | ||
338 | * @return int | ||
339 | */ | ||
340 | public function countAllEntriesByUserIdAndTagId($userId, $tagId) | ||
341 | { | ||
342 | $qb = $this->createQueryBuilder('e') | ||
343 | ->select('count(e.id)') | ||
344 | ->leftJoin('e.tags', 't') | ||
345 | ->where('e.user=:userId')->setParameter('userId', $userId) | ||
346 | ->andWhere('t.id=:tagId')->setParameter('tagId', $tagId) | ||
347 | ; | ||
348 | |||
349 | return (int) $qb->getQuery()->getSingleScalarResult(); | ||
350 | } | ||
351 | |||
352 | /** | ||
353 | * Remove all entries for a user id. | 333 | * Remove all entries for a user id. |
354 | * Used when a user want to reset all informations. | 334 | * Used when a user want to reset all informations. |
355 | * | 335 | * |