|
@@ -64,7 +64,7 @@ class User extends BaseUser
|
64
|
64
|
* Cet attribut contient les enregistrements FollowGroup lié
|
65
|
65
|
* a cet utilisateur dans le cadre des groupes suivis.
|
66
|
66
|
*
|
67
|
|
- * @ORM\OneToMany(targetEntity="FollowGroup", mappedBy="user")
|
|
67
|
+ * @ORM\OneToMany(targetEntity="FollowGroup", mappedBy="follower")
|
68
|
68
|
*/
|
69
|
69
|
protected $followed_groups;
|
70
|
70
|
|
|
@@ -177,7 +177,12 @@ class User extends BaseUser
|
177
|
177
|
*/
|
178
|
178
|
public function getFollowedsUsers()
|
179
|
179
|
{
|
180
|
|
- return $this->followeds_users;
|
|
180
|
+ $users = array();
|
|
181
|
+ foreach ($this->followeds_users as $follow_user)
|
|
182
|
+ {
|
|
183
|
+ $users[] = $follow_user->getFollowed();
|
|
184
|
+ }
|
|
185
|
+ return $users;
|
181
|
186
|
}
|
182
|
187
|
|
183
|
188
|
/**
|
|
@@ -187,7 +192,12 @@ class User extends BaseUser
|
187
|
192
|
*/
|
188
|
193
|
public function getFollowersUsers()
|
189
|
194
|
{
|
190
|
|
- return $this->followers_users;
|
|
195
|
+ $users = array();
|
|
196
|
+ foreach ($this->followers_users as $follow_user)
|
|
197
|
+ {
|
|
198
|
+ $users[] = $follow_user->getFollower();
|
|
199
|
+ }
|
|
200
|
+ return $users;
|
191
|
201
|
}
|
192
|
202
|
|
193
|
203
|
/**
|
|
@@ -207,7 +217,12 @@ class User extends BaseUser
|
207
|
217
|
*/
|
208
|
218
|
public function getFollowedGroups()
|
209
|
219
|
{
|
210
|
|
- return $this->followed_groups;
|
|
220
|
+ $groups = array();
|
|
221
|
+ foreach ($this->followed_groups as $follow_group)
|
|
222
|
+ {
|
|
223
|
+ $groups[] = $follow_group->getGroup();
|
|
224
|
+ }
|
|
225
|
+ return $groups;
|
211
|
226
|
}
|
212
|
227
|
|
213
|
228
|
/**
|