3 namespace Wallabag\CoreBundle\Entity
;
5 use Doctrine\ORM\Mapping
as ORM
;
6 use JMS\Serializer\Annotation\XmlRoot
;
7 use JMS\Serializer\Annotation\ExclusionPolicy
;
8 use JMS\Serializer\Annotation\Expose
;
9 use Doctrine\Common\Collections\ArrayCollection
;
16 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\TagRepository")
17 * @ExclusionPolicy("all")
25 * @ORM\Column(name="id", type="integer")
27 * @ORM\GeneratedValue(strategy="AUTO")
35 * @ORM\Column(name="label", type="text")
40 * @ORM\ManyToMany(targetEntity="Entry", mappedBy="tags", cascade={"persist"})
45 * @ORM\ManyToOne(targetEntity="User", inversedBy="tags")
49 public function __construct(User
$user)
52 $this->entries
= new ArrayCollection();
59 public function getId()
67 * @param string $label
71 public function setLabel($label)
73 $this->label
= $label;
83 public function getLabel()
88 public function addEntry(Entry
$entry)
90 $this->entries
[] = $entry;
96 public function getUser()