X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FEntity%2FTag.php;h=97c4579f70e8c1a607817a28ca5985912a2c8b3d;hb=ec00964de22a338d8f814c5440f8e09f542fdbbf;hp=92442df6ddb00ad823f43bc53f0c534d6be0760a;hpb=82d6d9cb06a1486e2e3b05fa6ce857b3b8655180;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php index 92442df6..97c4579f 100644 --- a/src/Wallabag/CoreBundle/Entity/Tag.php +++ b/src/Wallabag/CoreBundle/Entity/Tag.php @@ -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 */