]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Entity/Tag.php
Merge pull request #1392 from wallabag/v2-fix-redirect
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / Tag.php
index 92442df6ddb00ad823f43bc53f0c534d6be0760a..97c4579f70e8c1a607817a28ca5985912a2c8b3d 100644 (file)
@@ -48,7 +48,7 @@ class Tag
 
     public function __construct(User $user)
     {
-        $this->user    = $user;
+        $this->user = $user;
         $this->entries = new ArrayCollection();
     }
 
@@ -96,6 +96,11 @@ class Tag
         $this->entries[] = $entry;
     }
 
+    public function hasEntry($entry)
+    {
+        return $this->entries->contains($entry);
+    }
+
     /**
      * @return User
      */