src/Entity/Page.php line 13
<?phpnamespace App\Entity;use ApiPlatform\Metadata\ApiResource;use App\Repository\PageRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: PageRepository::class)]#[ApiResource]class Page{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $nom = null;#[ORM\Column(length: 255)]private ?string $url = null;#[ORM\Column(length: 255, nullable: true)]private ?string $icon = null;#[ORM\Column]private ?int $position = null;#[ORM\Column]private ?int $num_menu = null;#[ORM\OneToMany(mappedBy: 'page', targetEntity: ProfilDroitPage::class, orphanRemoval: true)]private Collection $profilDroitPages;public function __construct(){$this->profilDroitPages = 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 getUrl(): ?string{return $this->url;}public function setUrl(string $url): static{$this->url = $url;return $this;}public function getIcon(): ?string{return $this->icon;}public function setIcon(?string $icon): static{$this->icon = $icon;return $this;}public function getPosition(): ?int{return $this->position;}public function setPosition(int $position): static{$this->position = $position;return $this;}public function getNumMenu(): ?int{return $this->num_menu;}public function setNumMenu(int $num_menu): static{$this->num_menu = $num_menu;return $this;}/*** @return Collection<int, ProfilDroitPage>*/public function getProfilDroitPages(): Collection{return $this->profilDroitPages;}public function addProfilDroitPage(ProfilDroitPage $profilDroitPage): static{if (!$this->profilDroitPages->contains($profilDroitPage)) {$this->profilDroitPages->add($profilDroitPage);$profilDroitPage->setPage($this);}return $this;}public function removeProfilDroitPage(ProfilDroitPage $profilDroitPage): static{if ($this->profilDroitPages->removeElement($profilDroitPage)) {// set the owning side to null (unless already changed)if ($profilDroitPage->getPage() === $this) {$profilDroitPage->setPage(null);}}return $this;}}