aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/EntryRepository.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2017-03-31 17:28:54 +0200
committerGitHub <noreply@github.com>2017-03-31 17:28:54 +0200
commit19122cf66037f86375072ffa60b6a43b54f02f99 (patch)
tree62dc0812bc74e08f6fec9962bb62748e95e08aae /src/Wallabag/CoreBundle/Repository/EntryRepository.php
parentfa884b30ba0f8cb4231bd37fff23ef2f41ae6cfa (diff)
parent13a592a1288d7deb49211838368583c0109a5fbd (diff)
downloadwallabag-19122cf66037f86375072ffa60b6a43b54f02f99.tar.gz
wallabag-19122cf66037f86375072ffa60b6a43b54f02f99.tar.zst
wallabag-19122cf66037f86375072ffa60b6a43b54f02f99.zip
Merge pull request #3020 from wallabag/add-remove-archived-entries
Allow to remove all archived entries
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 9325d261..1f22e901 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -371,4 +371,12 @@ class EntryRepository extends EntityRepository
371 ->setParameter('userId', $userId) 371 ->setParameter('userId', $userId)
372 ->execute(); 372 ->execute();
373 } 373 }
374
375 public function removeArchivedByUserId($userId)
376 {
377 $this->getEntityManager()
378 ->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.user = :userId AND e.isArchived = TRUE')
379 ->setParameter('userId', $userId)
380 ->execute();
381 }
374} 382}