Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
716cf56cb2.url-de-test.ws
/
htdocs_old
/
src
/
Entity
/
/srv/data/web/vhosts/716cf56cb2.url-de-test.ws/htdocs_old/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\OneToOne(targetEntity="App\Entity\Establishment", mappedBy="page", cascade={"persist", "remove"}) */ private $establishment; /** * @ORM\OneToOne(targetEntity="App\Entity\PublicWelcomed", mappedBy="page", cascade={"persist", "remove"}) */ private $publicWelcomed; 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->metaTitle = $metaTitle; 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 getEstablishment(): ?Establishment { return $this->establishment; } public function setEstablishment(?Establishment $establishment): self { $this->establishment = $establishment; // set (or unset) the owning side of the relation if necessary $newPage = $establishment === null ? null : $this; if ($newPage !== $establishment->getPage()) { $establishment->setPage($newPage); } return $this; } public function getPublicWelcomed(): ?PublicWelcomed { return $this->publicWelcomed; } public function setPublicWelcomed(?PublicWelcomed $publicWelcomed): self { $this->publicWelcomed = $publicWelcomed; // set (or unset) the owning side of the relation if necessary $newPage = $publicWelcomed === null ? null : $this; if ($newPage !== $publicWelcomed->getPage()) { $publicWelcomed->setPage($newPage); } return $this; } }