menus = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getLabel(): ?string { return $this->label; } public function setLabel(string $label): self { $this->label = $label; return $this; } public function getCode(): ?string { return $this->code; } public function setCode(string $code): self { $this->code = $code; return $this; } public function getDomain(): ?string { return $this->domain; } public function setDomain(string $domain): self { $this->domain = $domain; return $this; } /** * @return Collection|Menu[] */ public function getMenus(): Collection { return $this->menus; } public function addMenu(Menu $menu): self { if (!$this->menus->contains($menu)) { $this->menus[] = $menu; $menu->setNavigation($this); } return $this; } public function removeMenu(Menu $menu): self { if ($this->menus->removeElement($menu)) { // set the owning side to null (unless already changed) if ($menu->getNavigation() === $this) { $menu->setNavigation(null); } } return $this; } }