src/Entity/PageType.php line 12
<?phpnamespace App\Entity;use App\Repository\PageTypeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: PageTypeRepository::class)]class PageType{const ABOUT = 'AB';const MEDIA = 'MD';const NEWS = 'NW';#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column(length: 2)]private ?string $pageTypeCode = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $updated = null;#[ORM\Column]private ?int $updatedBy = null;#[ORM\OneToMany(mappedBy: 'pageTypeCode', targetEntity: Page::class)]#@ORM\JoinColumn(name="page_type_code", referencedColumnName="page_type_code")private Collection $pages;public function __construct(){$this->pages = new ArrayCollection();}public function getPageTypeCode(): ?string{return $this->pageTypeCode;}public function setPageTypeCode(string $pageTypeCode): self{$this->pageTypeCode = $pageTypeCode;return $this;}public function getName(): ?string{return $this->name;}public function setName(string $name): self{$this->name = $name;return $this;}public function getUpdated(): ?\DateTimeInterface{return $this->updated;}public function setUpdated(\DateTimeInterface $updated): self{$this->updated = $updated;return $this;}public function getUpdatedBy(): ?int{return $this->updatedBy;}public function setUpdatedBy(int $updatedBy): self{$this->updatedBy = $updatedBy;return $this;}/*** @return Collection<int, Page>*/public function getPages(): Collection{return $this->pages;}public function addPage(Page $page): self{if (!$this->pages->contains($page)) {$this->pages->add($page);$page->setPageTypeCode($this);}return $this;}public function removePage(Page $page): self{if ($this->pages->removeElement($page)) {// set the owning side to null (unless already changed)if ($page->getPageTypeCode() === $this) {$page->setPageTypeCode(null);}}return $this;}}