id = $id; return $this; } public function __construct() { $this->pages = new ArrayCollection(); $this->menuchilds = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getSortby(): ?string { return $this->sortby; } public function setSortby(string $sortby): self { $this->sortby = $sortby; return $this; } public function getImage(): ?string { return $this->image; } public function setImage(?string $image): self { $this->image = $image; return $this; } /** * @return Collection */ public function getPages(): Collection { return $this->pages; } public function addPage(Page $page): self { if (!$this->pages->contains($page)) { $this->pages->add($page); $page->setPagetype($this); } return $this; } public function removePage(Page $page): self { if ($this->pages->removeElement($page)) { // set the owning side to null (unless already changed) if ($page->getPagetype() === $this) { $page->setPagetype(null); } } return $this; } /** * @return Collection */ public function getMenuchilds(): Collection { return $this->menuchilds; } public function addMenuchild(Menuchild $menuchild): self { if (!$this->menuchilds->contains($menuchild)) { $this->menuchilds->add($menuchild); $menuchild->setPagetype($this); } return $this; } public function removeMenuchild(Menuchild $menuchild): self { if ($this->menuchilds->removeElement($menuchild)) { // set the owning side to null (unless already changed) if ($menuchild->getPagetype() === $this) { $menuchild->setPagetype(null); } } return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): self { $this->description = $description; return $this; } }