<?phpnamespace App\Entity;use App\Repository\FormationMenuRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=FormationMenuRepository::class) */class FormationMenu{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $wording; /** * @ORM\Column(type="string", length=255) */ private $longwording; /** * @ORM\ManyToMany(targetEntity=Formation::class, mappedBy="menu") */ private $formations; /** * @ORM\Column(type="string", length=255) */ private $value; /** * @ORM\Column(type="string", length=255) */ private $icon; public function __construct() { $this->formations = new ArrayCollection(); } public function __toString() { return $this->wording; } public function getId(): ?int { return $this->id; } public function getWording(): ?string { return $this->wording; } public function setWording(string $wording): self { $this->wording = $wording; return $this; } public function getLongwording(): ?string { return $this->longwording; } public function setLongwording(string $longwording): self { $this->longwording = $longwording; return $this; } /** * @return Collection<int, Formation> */ public function getFormations(): Collection { return $this->formations; } public function addFormation(Formation $formation): self { if (!$this->formations->contains($formation)) { $this->formations[] = $formation; $formation->addMenu($this); } return $this; } public function removeFormation(Formation $formation): self { if ($this->formations->removeElement($formation)) { $formation->removeMenu($this); } return $this; } public function getValue(): ?string { return $this->value; } public function setValue(string $value): self { $this->value = $value; return $this; } public function getIcon(): ?string { return $this->icon; } public function setIcon(string $icon): self { $this->icon = $icon; return $this; }}