X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FRepository%2FEntryRepository.php;h=3a1f19b4ccad3adc761f6cff35c32c184859ce85;hb=refs%2Fheads%2Ftags-3235;hp=b5e35eff3848a69a8e0ee43e769a7fa55aee18b1;hpb=685a5d745e2b723a09111d7d31157cced67ea9b4;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index b5e35eff..3a1f19b4 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -115,6 +115,20 @@ class EntryRepository extends EntityRepository ->andWhere('size(e.tags) = 0'); } + /** + * Retrieve the number of untagged entries for a user. + * + * @param int $userId + * + * @return int + */ + public function countUntaggedEntriesByUser($userId) + { + return $this->getRawBuilderForUntaggedByUser($userId) + ->select('count(e.id)') + ->getSingleScalarResult(); + } + /** * Find Entries. *