X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/0d7f4976cd0f4eb1434edeb9d55c7024517128b9..c812e773a8195a42a718ce2de0a4e9bca65382aa:/Entity/Location.php?ds=sidebyside diff --git a/Entity/Location.php b/Entity/Location.php index c379b56..984e8d8 100644 --- a/Entity/Location.php +++ b/Entity/Location.php @@ -429,6 +429,9 @@ class Location { * @return Location */ public function addUser(User $user): Location { + //Add from owning side + $user->addSubscriber($this); + $this->users[] = $user; return $this; @@ -441,6 +444,9 @@ class Location { * @return bool */ public function removeUser(User $user): bool { + //Remove from owning side + $user->removeSubscriber($this); + return $this->users->removeElement($user); }