|
@@ -31,6 +31,14 @@ class User extends BaseUser
|
31
|
31
|
protected $tags_favorites;
|
32
|
32
|
|
33
|
33
|
/**
|
|
34
|
+ * Cet attribut contient les enregistrements UsersElementsFavorites lié
|
|
35
|
+ * a cet utilisateur dans le cadre des éléments Favoris.
|
|
36
|
+ *
|
|
37
|
+ * @ORM\OneToMany(targetEntity="Muzich\CoreBundle\Entity\UsersElementsFavorites", mappedBy="user")
|
|
38
|
+ */
|
|
39
|
+ protected $elements_favorites;
|
|
40
|
+
|
|
41
|
+ /**
|
34
|
42
|
* Liste des Elements appartenant a cet utilisateur.
|
35
|
43
|
*
|
36
|
44
|
* @ORM\OneToMany(targetEntity="Muzich\CoreBundle\Entity\Element", mappedBy="owner")
|
|
@@ -76,4 +84,44 @@ class User extends BaseUser
|
76
|
84
|
{
|
77
|
85
|
$this->tags_favorites[] = $tagsFavorites;
|
78
|
86
|
}
|
|
87
|
+
|
|
88
|
+ /**
|
|
89
|
+ * Add elements_favorites
|
|
90
|
+ *
|
|
91
|
+ * @param Muzich\CoreBundle\Entity\UsersElementsFavorites $elementsFavorites
|
|
92
|
+ */
|
|
93
|
+ public function addUsersElementsFavorites(Muzich\CoreBundle\Entity\UsersElementsFavorites $elementsFavorites)
|
|
94
|
+ {
|
|
95
|
+ $this->elements_favorites[] = $elementsFavorites;
|
|
96
|
+ }
|
|
97
|
+
|
|
98
|
+ /**
|
|
99
|
+ * Get elements_favorites
|
|
100
|
+ *
|
|
101
|
+ * @return Doctrine\Common\Collections\Collection
|
|
102
|
+ */
|
|
103
|
+ public function getElementsFavorites()
|
|
104
|
+ {
|
|
105
|
+ return $this->elements_favorites;
|
|
106
|
+ }
|
|
107
|
+
|
|
108
|
+ /**
|
|
109
|
+ * Add elements
|
|
110
|
+ *
|
|
111
|
+ * @param Muzich\CoreBundle\Entity\Element $elements
|
|
112
|
+ */
|
|
113
|
+ public function addElement(Muzich\CoreBundle\Entity\Element $elements)
|
|
114
|
+ {
|
|
115
|
+ $this->elements[] = $elements;
|
|
116
|
+ }
|
|
117
|
+
|
|
118
|
+ /**
|
|
119
|
+ * Get elements
|
|
120
|
+ *
|
|
121
|
+ * @return Doctrine\Common\Collections\Collection
|
|
122
|
+ */
|
|
123
|
+ public function getElements()
|
|
124
|
+ {
|
|
125
|
+ return $this->elements;
|
|
126
|
+ }
|
79
|
127
|
}
|