X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/7a3c81a5fa9cc1ad105457d1f4f7153df2475e7e..9a4fd9519332e2056058977a6170f04c4aca2408:/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 *