X-Git-Url: https://git.rapsys.eu/.gitweb.cgi/airbundle/blobdiff_plain/8bda7e198de0ed76268be5c51b24ed9eeb6af54b..7a3c81a5fa9cc1ad105457d1f4f7153df2475e7e:/Entity/Location.php diff --git a/Entity/Location.php b/Entity/Location.php index 73fc6b9..e57f235 100644 --- a/Entity/Location.php +++ b/Entity/Location.php @@ -66,11 +66,17 @@ class Location { */ private $sessions; + /** + * @var \Doctrine\Common\Collections\Collection + */ + private $snippets; + /** * Constructor */ public function __construct() { $this->sessions = new \Doctrine\Common\Collections\ArrayCollection(); + $this->snippets = new \Doctrine\Common\Collections\ArrayCollection(); } /** @@ -333,6 +339,37 @@ class Location { return $this->sessions; } + /** + * Add snippet + * + * @param \Rapsys\AirBundle\Entity\Snippet $snippet + * + * @return Location + */ + public function addSnippet(\Rapsys\AirBundle\Entity\Snippet $snippet) { + $this->snippets[] = $snippet; + + return $this; + } + + /** + * Remove snippet + * + * @param \Rapsys\AirBundle\Entity\Snippet $snippet + */ + public function removeSnippet(\Rapsys\AirBundle\Entity\Snippet $snippet) { + $this->snippets->removeElement($snippet); + } + + /** + * Get snippets + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getSnippets() { + return $this->snippets; + } + /** * Returns a string representation of the location *