src/Entity/Page.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PageRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Entity\Node;
  6. use App\Entity\Image;
  7. #[ORM\Entity(repositoryClassPageRepository::class)]
  8. class Page extends Node
  9. {
  10.     #[ORM\OneToOne]
  11.     private ?Image $image null;
  12.     #[ORM\OneToOne]
  13.     private ?Image $banner null;
  14.     /**
  15.      * @return Image|null
  16.      */
  17.     public function getImage(): ?Image
  18.     {
  19.         return $this->image;
  20.     }
  21.     /**
  22.      * @param Image|null $image
  23.      * @return $this
  24.      */
  25.     public function setImage(?Image $image): static
  26.     {
  27.         $this->image $image;
  28.         return $this;
  29.     }
  30.     /**
  31.      * @return Image|null
  32.      */
  33.     public function getBanner(): ?Image
  34.     {
  35.         return $this->banner;
  36.     }
  37.     /**
  38.      * @param Image|null $banner
  39.      * @return Page
  40.      */
  41.     public function setBanner(?Image $banner): static
  42.     {
  43.         $this->banner $banner;
  44.         return $this;
  45.     }
  46. }