<?phpnamespace App\Entity\Page;use App\Entity\Blog;use App\Entity\FooterLink;use App\Entity\Metatag;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;use App\Entity\Traits\AutoTranslateTrait;use App\Entity\Traits\IdTrait;use App\Entity\Traits\TimeStampAbleTrait;use App\Repository\PageRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=PageRepository::class) * @ORM\HasLifecycleCallbacks */class Page implements TranslatableInterface{ use IdTrait; use TimeStampAbleTrait; use TranslatableTrait; use AutoTranslateTrait; /** * @ORM\Column(type="integer", options={"unsigned": true}, nullable=true) */ private int $migrationId; /** * @ORM\Column(type="string", nullable=true) */ private ?string $templatePath; /** * @ORM\OneToOne(targetEntity=Blog::class, cascade={"persist", "remove"}) * @ORM\JoinColumn(nullable=true) */ private $blog; /** * @ORM\OneToOne(targetEntity=FooterLink::class, mappedBy="page", cascade={"persist", "remove"}) * @ORM\JoinColumn(nullable=true) */ private $footerLink; public function __construct(){} /** * @return int */ public function getMigrationId(): int { return $this->migrationId; } /** * @return string|null */ public function getTemplatePath(): ?string { return $this->templatePath; } /** * @param int $migrationId */ public function setMigrationId(int $migrationId): self { $this->migrationId = $migrationId; return $this; } /** * @param string|null $templatePath */ public function setTemplatePath(?string $templatePath): self { $this->templatePath = $templatePath; return $this; } /** * @return null|Blog */ public function getBlog(): ?Blog { return $this->blog; } public function setBlog(?Blog $blog): self { $this->blog = $blog; return $this; } public function getFooterLink(): ?FooterLink { return $this->footerLink; } public function setFooterLink(?FooterLink $footerLink): self { // unset the owning side of the relation if necessary if ($footerLink === null && $this->footerLink !== null) { $this->footerLink->setPage(null); } // set the owning side of the relation if necessary if ($footerLink !== null && $footerLink->getPage() !== $this) { $footerLink->setPage($this); } $this->footerLink = $footerLink; return $this; }}