X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FEntity%2FTag.php;h=97c4579f70e8c1a607817a28ca5985912a2c8b3d;hb=7083d183b9df11f350be0d7039f5f0e33536b94b;hp=afe9e1b9af22a8d4263d29a9728afa641ca0c894;hpb=4346a86068781f4acdeb574d7e2af08b77b58ea7;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php index afe9e1b9..97c4579f 100644 --- a/src/Wallabag/CoreBundle/Entity/Tag.php +++ b/src/Wallabag/CoreBundle/Entity/Tag.php @@ -48,9 +48,15 @@ class Tag public function __construct(User $user) { - $this->user = $user; + $this->user = $user; $this->entries = new ArrayCollection(); } + + public function __toString() + { + return $this->label; + } + /** * Get id. * @@ -90,6 +96,11 @@ class Tag $this->entries[] = $entry; } + public function hasEntry($entry) + { + return $this->entries->contains($entry); + } + /** * @return User */