|
@@ -17,6 +17,11 @@ class Tag
|
17
|
17
|
protected $elements;
|
18
|
18
|
|
19
|
19
|
/**
|
|
20
|
+ * @ORM\ManyToMany(targetEntity="Muzich\UserBundle\Entity\User", mappedBy="tags_favorites")
|
|
21
|
+ */
|
|
22
|
+ protected $users_favorites;
|
|
23
|
+
|
|
24
|
+ /**
|
20
|
25
|
* @ORM\Id
|
21
|
26
|
* @ORM\Column(type="integer")
|
22
|
27
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
@@ -32,57 +37,79 @@ class Tag
|
32
|
37
|
|
33
|
38
|
public function __construct()
|
34
|
39
|
{
|
|
40
|
+ $this->users_favorites = new \Doctrine\Common\Collections\ArrayCollection();
|
35
|
41
|
$this->elements = new \Doctrine\Common\Collections\ArrayCollection();
|
36
|
42
|
}
|
37
|
43
|
|
38
|
44
|
|
39
|
|
- /**
|
40
|
|
- * Get id
|
41
|
|
- *
|
42
|
|
- * @return integer
|
43
|
|
- */
|
44
|
|
- public function getId()
|
45
|
|
- {
|
46
|
|
- return $this->id;
|
47
|
|
- }
|
|
45
|
+ /**
|
|
46
|
+ * Get id
|
|
47
|
+ *
|
|
48
|
+ * @return integer
|
|
49
|
+ */
|
|
50
|
+ public function getId()
|
|
51
|
+ {
|
|
52
|
+ return $this->id;
|
|
53
|
+ }
|
48
|
54
|
|
49
|
|
- /**
|
50
|
|
- * Set name
|
51
|
|
- *
|
52
|
|
- * @param string $name
|
53
|
|
- */
|
54
|
|
- public function setName($name)
|
55
|
|
- {
|
56
|
|
- $this->name = $name;
|
57
|
|
- }
|
|
55
|
+ /**
|
|
56
|
+ * Set name
|
|
57
|
+ *
|
|
58
|
+ * @param string $name
|
|
59
|
+ */
|
|
60
|
+ public function setName($name)
|
|
61
|
+ {
|
|
62
|
+ $this->name = $name;
|
|
63
|
+ }
|
58
|
64
|
|
59
|
|
- /**
|
60
|
|
- * Get name
|
61
|
|
- *
|
62
|
|
- * @return string
|
63
|
|
- */
|
64
|
|
- public function getName()
|
65
|
|
- {
|
66
|
|
- return $this->name;
|
67
|
|
- }
|
|
65
|
+ /**
|
|
66
|
+ * Get name
|
|
67
|
+ *
|
|
68
|
+ * @return string
|
|
69
|
+ */
|
|
70
|
+ public function getName()
|
|
71
|
+ {
|
|
72
|
+ return $this->name;
|
|
73
|
+ }
|
68
|
74
|
|
69
|
|
- /**
|
70
|
|
- * Add elements
|
71
|
|
- *
|
72
|
|
- * @param Muzich\CoreBundle\Entity\Tag $elements
|
73
|
|
- */
|
74
|
|
- public function addTag(\Muzich\CoreBundle\Entity\Tag $elements)
|
75
|
|
- {
|
76
|
|
- $this->elements[] = $elements;
|
77
|
|
- }
|
|
75
|
+ /**
|
|
76
|
+ * Add elements
|
|
77
|
+ *
|
|
78
|
+ * @param Muzich\CoreBundle\Entity\Tag $elements
|
|
79
|
+ */
|
|
80
|
+ public function addTag(Muzich\CoreBundle\Entity\Tag $elements)
|
|
81
|
+ {
|
|
82
|
+ $this->elements[] = $elements;
|
|
83
|
+ }
|
|
84
|
+
|
|
85
|
+ /**
|
|
86
|
+ * Get elements
|
|
87
|
+ *
|
|
88
|
+ * @return Doctrine\Common\Collections\Collection
|
|
89
|
+ */
|
|
90
|
+ public function getElements()
|
|
91
|
+ {
|
|
92
|
+ return $this->elements;
|
|
93
|
+ }
|
|
94
|
+
|
|
95
|
+ /**
|
|
96
|
+ * Add users_favorites
|
|
97
|
+ *
|
|
98
|
+ * @param Muzich\UserBundle\Entity\User $usersFavorites
|
|
99
|
+ */
|
|
100
|
+ public function addUser(Muzich\UserBundle\Entity\User $usersFavorites)
|
|
101
|
+ {
|
|
102
|
+ $this->users_favorites[] = $usersFavorites;
|
|
103
|
+ }
|
78
|
104
|
|
79
|
|
- /**
|
80
|
|
- * Get elements
|
81
|
|
- *
|
82
|
|
- * @return Doctrine\Common\Collections\Collection
|
83
|
|
- */
|
84
|
|
- public function getElements()
|
85
|
|
- {
|
86
|
|
- return $this->elements;
|
87
|
|
- }
|
|
105
|
+ /**
|
|
106
|
+ * Get users_favorites
|
|
107
|
+ *
|
|
108
|
+ * @return Doctrine\Common\Collections\Collection
|
|
109
|
+ */
|
|
110
|
+ public function getUsersFavorites()
|
|
111
|
+ {
|
|
112
|
+ return $this->users_favorites;
|
|
113
|
+ }
|
|
114
|
+
|
88
|
115
|
}
|