Rapsys Git
/
airbundle
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reverse subscriber/subscription owning side
[airbundle]
/
Entity
/
Location.php
diff --git
a/Entity/Location.php
b/Entity/Location.php
index 613e46281c3664f841ddbc86f8790c8bfb50f966..73b07f7c93d02183f9b6db768cab05c48ffea2b5 100644
(file)
--- a/
Entity/Location.php
+++ b/
Entity/Location.php
@@
-430,7
+430,7
@@
class Location {
*/
public function addUser(User $user): Location {
//Add from owning side
*/
public function addUser(User $user): Location {
//Add from owning side
- $user->add
Subscriber
($this);
+ $user->add
Location
($this);
$this->users[] = $user;
$this->users[] = $user;
@@
-444,12
+444,12
@@
class Location {
* @return bool
*/
public function removeUser(User $user): bool {
* @return bool
*/
public function removeUser(User $user): bool {
- if (!$this->
user
s->contains($user)) {
+ if (!$this->
location
s->contains($user)) {
return true;
}
//Remove from owning side
return true;
}
//Remove from owning side
- $user->remove
Subscriber
($this);
+ $user->remove
Location
($this);
return $this->users->removeElement($user);
}
return $this->users->removeElement($user);
}