productFamilies = new ArrayCollection(); $this->orderShops = new ArrayCollection(); $this->openings = new ArrayCollection(); $this->productCategories = new ArrayCollection(); } public function __toString() { return $this->getTitle(); } public function getMerchant(): ?MerchantInterface { return $this->merchant; } public function setMerchant(?MerchantInterface $merchant): self { $this->merchant = $merchant; return $this; } public function getColor(): ?string { return $this->color; } public function setColor(string $color): self { $this->color = $color; return $this; } public function getCycle(): ?string { return $this->cycle; } public function setCycle(string $cycle): self { $this->cycle = $cycle; return $this; } /** * @return Collection|ProductFamilyInterface[] */ public function getProductFamilies(): Collection { return $this->productFamilies; } public function addProductFamily(ProductFamilyInterface $productFamily): self { if (!$this->productFamilies->contains($productFamily)) { $this->productFamilies[] = $productFamily; $productFamily->addSection($this); } return $this; } public function removeProductFamily(ProductFamilyInterface $productFamily): self { if ($this->productFamilies->contains($productFamily)) { $this->productFamilies->removeElement($productFamily); $productFamily->removeSection($this); } return $this; } /** * @return Collection|OrderShopInterface[] */ public function getOrderShops(): Collection { return $this->orderShops; } public function addOrderShop(OrderShopInterface $orderShop): self { if (!$this->orderShops->contains($orderShop)) { $this->orderShops[] = $orderShop; $orderShop->setSection($this); } return $this; } public function removeOrderShop(OrderShopInterface $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; } /** * @return Collection|ProductCategoryInterface[] */ public function getProductCategories(): Collection { return $this->productCategories; } public function addProductCategory(ProductCategoryInterface $productCategory): self { if (!$this->productCategories->contains($productCategory)) { $this->productCategories[] = $productCategory; $productCategory->setSection($this); } return $this; } public function removeProductCategory(ProductCategoryInterface $productCategory): self { if ($this->productCategories->contains($productCategory)) { $this->productCategories->removeElement($productCategory); // set the owning side to null (unless already changed) if ($productCategory->getSection() === $this) { $productCategory->setSection(null); } } return $this; } /** * @return Collection|PageInterface[] */ public function getPages(): Collection { return $this->pages; } public function addPage(PageInterface $page): self { if (!$this->pages->contains($page)) { $this->pages[] = $page; $page->setSection($this); } return $this; } public function removePage(PageInterface $page): self { if ($this->pages->removeElement($page)) { // set the owning side to null (unless already changed) if ($page->getSection() === $this) { $page->setSection(null); } } return $this; } public function getIsDefault(): ?bool { return $this->isDefault; } public function setIsDefault(?bool $isDefault): self { $this->isDefault = $isDefault; return $this; } /** * @return Collection|SectionSettingInterface[] */ public function getSettings(): Collection { return $this->settings; } public function addSetting(SectionSettingInterface $sectionSetting): self { if (!$this->settings->contains($sectionSetting)) { $this->settings[] = $sectionSetting; $sectionSetting->setMerchant($this); } return $this; } public function removeSetting(SectionSettingInterface $sectionSetting): self { if ($this->settings->contains($sectionSetting)) { $this->settings->removeElement($sectionSetting); // set the owning side to null (unless already changed) if ($sectionSetting->getMerchant() === $this) { $sectionSetting->setMerchant(null); } } return $this; } /** * @return Collection|OpeningInterface[] */ public function getOpenings(): Collection { return $this->openings; } public function addOpening(OpeningInterface $opening): self { if (!$this->openings->contains($opening)) { $this->openings[] = $opening; $opening->setSection($this); } return $this; } public function removeOpening(OpeningInterface $opening): self { if ($this->openings->removeElement($opening)) { // set the owning side to null (unless already changed) if ($opening->getSection() === $this) { $opening->setSection(null); } } return $this; } }