productFamilies = new ArrayCollection(); $this->orderShops = new ArrayCollection(); } public function __toString() { return $this->getTitle(); } public function getCycle(): ?string { return $this->cycle; } public function setCycle(string $cycle): self { $this->cycle = $cycle; return $this; } /** * @return Collection|ProductFamily[] */ public function getProductFamilies(): Collection { return $this->productFamilies; } public function addProductFamily(ProductFamily $productFamily): self { if (!$this->productFamilies->contains($productFamily)) { $this->productFamilies[] = $productFamily; $productFamily->addSection($this); } return $this; } public function removeProductFamily(ProductFamily $productFamily): self { if ($this->productFamilies->contains($productFamily)) { $this->productFamilies->removeElement($productFamily); $productFamily->removeSection($this); } return $this; } /** * @return Collection|OrderShop[] */ public function getOrderShops(): Collection { return $this->orderShops; } public function addOrderShop(OrderShop $orderShop): self { if (!$this->orderShops->contains($orderShop)) { $this->orderShops[] = $orderShop; $orderShop->setSection($this); } return $this; } public function removeOrderShop(OrderShop $orderShop): self { if ($this->orderShops->contains($orderShop)) { $this->orderShops->removeElement($orderShop); // set the owning side to null (unless already changed) if ($orderShop->getSection() === $this) { $orderShop->setSection(null); } } return $this; } }