diff options
author | Kevin Decherf <kevin@kdecherf.com> | 2018-09-02 16:43:49 +0200 |
---|---|---|
committer | Kevin Decherf <kevin@kdecherf.com> | 2018-09-02 17:50:02 +0200 |
commit | 86fd3da135d9ca2241dc09680d5dac1dd57fc707 (patch) | |
tree | dc25d02f454dc9a90bb9b55c2f617a0228a499b1 /src/Wallabag/CoreBundle/Repository/EntryRepository.php | |
parent | 685a5d745e2b723a09111d7d31157cced67ea9b4 (diff) | |
download | wallabag-tags-3235.tar.gz wallabag-tags-3235.tar.zst wallabag-tags-3235.zip |
Show untagged entries count on tag listtags-3235
Closes #3235
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 14 |
1 files changed, 14 insertions, 0 deletions
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 | |||
@@ -116,6 +116,20 @@ class EntryRepository extends EntityRepository | |||
116 | } | 116 | } |
117 | 117 | ||
118 | /** | 118 | /** |
119 | * Retrieve the number of untagged entries for a user. | ||
120 | * | ||
121 | * @param int $userId | ||
122 | * | ||
123 | * @return int | ||
124 | */ | ||
125 | public function countUntaggedEntriesByUser($userId) | ||
126 | { | ||
127 | return $this->getRawBuilderForUntaggedByUser($userId) | ||
128 | ->select('count(e.id)') | ||
129 | ->getSingleScalarResult(); | ||
130 | } | ||
131 | |||
132 | /** | ||
119 | * Find Entries. | 133 | * Find Entries. |
120 | * | 134 | * |
121 | * @param int $userId | 135 | * @param int $userId |