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