*/ #[ORM\ManyToMany(targetEntity: Menu::class, mappedBy: 'plats')] private Collection $menus; public function __construct() { $this->menus = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getNom(): ?string { return $this->nom; } public function setNom(string $nom): static { $this->nom = $nom; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(string $description): static { $this->description = $description; return $this; } public function getPrix(): ?float { return $this->prix; } public function setPrix(float $prix): static { $this->prix = $prix; return $this; } public function getCategorie(): ?categorie { return $this->categorie; } public function setCategorie(?categorie $categorie): static { $this->categorie = $categorie; return $this; } /** * @return Collection */ public function getMenus(): Collection { return $this->menus; } public function addMenu(Menu $menu): static { if (!$this->menus->contains($menu)) { $this->menus->add($menu); $menu->addPlat($this); } return $this; } public function removeMenu(Menu $menu): static { if ($this->menus->removeElement($menu)) { $menu->removePlat($this); } return $this; } }