X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/cfa1cbd1a6afcb7eab47d1de15d86a4e75f4ca8c..69a64a58dd54f3bb9479b72d32c3da7b924b7875:/Entity/Location.php?ds=sidebyside 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 *