X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/7a3c81a5fa9cc1ad105457d1f4f7153df2475e7e..a680427e51cabd3532600858f86f63c83a2fcf3c:/Entity/Location.php diff --git a/Entity/Location.php b/Entity/Location.php index e57f235..fd61969 100644 --- a/Entity/Location.php +++ b/Entity/Location.php @@ -71,12 +71,18 @@ class Location { */ private $snippets; + /** + * @var \Doctrine\Common\Collections\Collection + */ + private $users; + /** * Constructor */ public function __construct() { $this->sessions = new \Doctrine\Common\Collections\ArrayCollection(); $this->snippets = new \Doctrine\Common\Collections\ArrayCollection(); + $this->users = new \Doctrine\Common\Collections\ArrayCollection(); } /** @@ -370,6 +376,37 @@ class Location { return $this->snippets; } + /** + * Add user + * + * @param \Rapsys\AirBundle\Entity\User $user + * + * @return Location + */ + public function addUser(\Rapsys\AirBundle\Entity\User $user) { + $this->users[] = $user; + + return $this; + } + + /** + * Remove user + * + * @param \Rapsys\AirBundle\Entity\User $user + */ + public function removeUser(\Rapsys\AirBundle\Entity\User $user) { + $this->users->removeElement($user); + } + + /** + * Get users + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getUsers() { + return $this->users; + } + /** * Returns a string representation of the location *