<?phpnamespace App\Entity;use App\Entity\Traits\CommonTrait;use App\Repository\PageRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;/** * @ORM\Entity(repositoryClass=PageRepository::class) * @ORM\Table(name="app_page") * @ORM\HasLifecycleCallbacks() * @UniqueEntity({"uuid"}) */class Page{ use CommonTrait; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\Column(type="string", length=255, unique=true) */ private $url; /** * @ORM\ManyToMany(targetEntity=PageSection::class) * @ORM\JoinTable(name="app_page_top_section") */ private $topContent; /** * @ORM\ManyToMany(targetEntity=PageSection::class) * @ORM\JoinTable(name="app_page_middle_section") */ private $middleContent; /** * @ORM\ManyToMany(targetEntity=PageSection::class) * @ORM\JoinTable(name="app_page_bottom_section") */ private $bottomContent; /** * @ORM\Column(type="boolean", nullable=true) */ private $isSystemPage; /** * @ORM\Column(type="string", length=255) */ private $uKey; public function __construct() { $this->topContent = new ArrayCollection(); $this->middleContent = new ArrayCollection(); $this->bottomContent = new ArrayCollection(); } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getUrl(): ?string { return $this->url; } public function setUrl(string $url): self { $this->url = $url; return $this; } /** * @return Collection<int, PageSection> */ public function getTopContent(): Collection { return $this->topContent; } public function addTopContent(PageSection $topContent): self { if (!$this->topContent->contains($topContent)) { $this->topContent[] = $topContent; } return $this; } public function removeTopContent(PageSection $topContent): self { $this->topContent->removeElement($topContent); return $this; } /** * @return Collection<int, PageSection> */ public function getMiddleContent(): Collection { return $this->middleContent; } public function addMiddleContent(PageSection $middleContent): self { if (!$this->middleContent->contains($middleContent)) { $this->middleContent[] = $middleContent; } return $this; } public function removeMiddleContent(PageSection $middleContent): self { $this->middleContent->removeElement($middleContent); return $this; } /** * @return Collection<int, PageSection> */ public function getBottomContent(): Collection { return $this->bottomContent; } public function addBottomContent(PageSection $bottomContent): self { if (!$this->bottomContent->contains($bottomContent)) { $this->bottomContent[] = $bottomContent; } return $this; } public function removeBottomContent(PageSection $bottomContent): self { $this->bottomContent->removeElement($bottomContent); return $this; } public function getIsSystemPage(): ?bool { return $this->isSystemPage; } public function setIsSystemPage(?bool $isSystemPage): self { $this->isSystemPage = $isSystemPage; return $this; } public function getUKey(): ?string { return $this->uKey; } public function setUKey(string $uKey): self { $this->uKey = $uKey; return $this; }}