Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
trash
/
vhost_www.bachtale.com_1719306535
/
htdocs
/
src
/
Entity
/
//srv/data/trash/vhost_www.bachtale.com_1719306535/htdocs/src/Entity/Page.php
<?php namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\ArrayCollection; use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity(repositoryClass="App\Repository\PageRepository") */ class Page { /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=512, nullable=true) */ private $metaTitle; /** * @ORM\Column(type="text", nullable=true) */ private $metaDescription; /** * @ORM\Column(type="string", length=255) */ private $title; /** * @ORM\Column(type="datetime") */ private $createdAt; /** * @ORM\Column(type="datetime") */ private $updatedAt; /** * @ORM\Column(type="boolean") */ private $isActive; /** * @ORM\OneToMany(targetEntity="App\Entity\PageBlock", mappedBy="page", cascade={"persist", "remove"}) * @Assert\Valid */ private $pageBlocks; /** * @ORM\Column(type="string", length=255) */ private $type; public function __construct() { $this->isActive = true; $this->createdAt = new \DateTime(); $this->updatedAt = new \DateTime(); $this->pageBlocks = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getMetaTitle(): ?string { return $this->metaTitle; } public function setMetaTitle(string $metaTitle): self { $this->metaTitle = $metaTitle; return $this; } public function getMetaDescription(): ?string { return $this->metaDescription; } public function setMetaDescription(string $metaDescription): self { $this->metaDescription = $metaDescription; return $this; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): self { $this->title = $title; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } public function getIsActive(): ?bool { return $this->isActive; } public function setIsActive(bool $isActive): self { $this->isActive = $isActive; return $this; } /** * @return Collection|PageBlock[] */ public function getPageBlocks(): Collection { return $this->pageBlocks; } public function addPageBlock(PageBlock $pageBlock): self { if (!$this->pageBlocks->contains($pageBlock)) { $this->pageBlocks[] = $pageBlock; $pageBlock->setPage($this); } return $this; } public function removePageBlock(PageBlock $pageBlock): self { if ($this->pageBlocks->contains($pageBlock)) { $this->pageBlocks->removeElement($pageBlock); // set the owning side to null (unless already changed) if ($pageBlock->getPage() === $this) { $pageBlock->setPage(null); } } return $this; } public function getType(): ?string { return $this->type; } public function setType(string $type): self { $this->type = $type; return $this; } }