X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FEntity%2FTag.php;h=92442df6ddb00ad823f43bc53f0c534d6be0760a;hb=34437f408c5b7b590aded6795d7ce01bfbfc7711;hp=29a5e4b5eb69e1b2b07ef1bb49608afce7469e7a;hpb=092ca70725b0263390e45c46f93828c613eca3f0;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php index 29a5e4b5..92442df6 100644 --- a/src/Wallabag/CoreBundle/Entity/Tag.php +++ b/src/Wallabag/CoreBundle/Entity/Tag.php @@ -9,17 +9,17 @@ use JMS\Serializer\Annotation\Expose; use Doctrine\Common\Collections\ArrayCollection; /** - * Tag + * Tag. * * @XmlRoot("tag") - * @ORM\Table(name="tag") + * @ORM\Table * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\TagRepository") * @ExclusionPolicy("all") */ class Tag { /** - * @var integer + * @var int * * @Expose * @ORM\Column(name="id", type="integer") @@ -51,10 +51,16 @@ class Tag $this->user = $user; $this->entries = new ArrayCollection(); } + + public function __toString() + { + return $this->label; + } + /** - * Get id + * Get id. * - * @return integer + * @return int */ public function getId() { @@ -62,9 +68,10 @@ class Tag } /** - * Set label + * Set label. + * + * @param string $label * - * @param string $label * @return Tag */ public function setLabel($label) @@ -75,7 +82,7 @@ class Tag } /** - * Get label + * Get label. * * @return string */ @@ -88,4 +95,12 @@ class Tag { $this->entries[] = $entry; } + + /** + * @return User + */ + public function getUser() + { + return $this->user; + } }