]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Repository/EntryRepository.php
Delete tag or tags by label
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Repository / EntryRepository.php
index e9351d85ef439451584a7b2315c5a1fbc56854b9..63c4c3be9f0f21f021a2c9d010f9fb3085499439 100644 (file)
@@ -222,6 +222,19 @@ class EntryRepository extends EntityRepository
         $this->getEntityManager()->flush();
     }
 
+    /**
+     * Remove tags from all user entries
+     *
+     * @param int $userId
+     * @param Array<Tag> $tags
+     */
+
+    public function removeTags($userId, $tags) {
+        foreach ($tags as $tag) {
+            $this->removeTag($userId, $tag);
+        }
+    }
+
     /**
      * Find all entries that are attached to a give tag id.
      *