]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Entity/Tag.php
1cdf4df027cc772dcbedf8f8923276ded593a77a
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / Tag.php
1 <?php
2
3 namespace Wallabag\CoreBundle\Entity;
4
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
10 /**
11 * Tag
12 *
13 * @XmlRoot("tag")
14 * @ORM\Table(name="tag")
15 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\TagRepository")
16 * @ExclusionPolicy("all")
17 */
18 class Tag
19 {
20 /**
21 * @var integer
22 *
23 * @Expose
24 * @ORM\Column(name="id", type="integer")
25 * @ORM\Id
26 * @ORM\GeneratedValue(strategy="AUTO")
27 */
28 private $id;
29
30 /**
31 * @var string
32 *
33 * @Expose
34 * @ORM\Column(name="label", type="text")
35 */
36 private $label;
37
38 /**
39 * @ORM\ManyToMany(targetEntity="Entry", mappedBy="tags", cascade={"persist", "merge"})
40 */
41 private $entries;
42
43 /**
44 * Get id
45 *
46 * @return integer
47 */
48 public function getId()
49 {
50 return $this->id;
51 }
52
53 /**
54 * Set label
55 *
56 * @param string $label
57 * @return Tag
58 */
59 public function setLabel($label)
60 {
61 $this->label = $label;
62
63 return $this;
64 }
65
66 /**
67 * Get label
68 *
69 * @return string
70 */
71 public function getLabel()
72 {
73 return $this->label;
74 }
75 }