src/Entity/Page.php line 15

  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Trait\MainTranslationTrait;
  4. use App\Entity\Translation\PageTranslation;
  5. use App\Repository\PageRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. use Gedmo\Translatable\Translatable;
  9. #[ORM\Table(name'page')]
  10. #[ORM\Entity(repositoryClassPageRepository::class)]
  11. #[Gedmo\TranslationEntity(class: PageTranslation::class)]
  12. class Page implements Translatable
  13. {
  14.     use MainTranslationTrait;
  15.     const TRANSLATION_ENTITY PageTranslation::class;
  16.     #[ORM\Id]
  17.     #[ORM\GeneratedValue]
  18.     #[ORM\Column]
  19.     private ?int $id null;
  20.     #[ORM\Column(type'string',uniquetrue)]
  21.     private string $slug;
  22.     #[ORM\Column(type'string'nullabletrue)]
  23.     #[Gedmo\Translatable]
  24.     private ?string $title null;
  25.     #[ORM\Column(type'string'nullabletrue)]
  26.     #[Gedmo\Translatable]
  27.     private ?string $metaTitle null;
  28.     #[ORM\Column(type'string',length160nullabletrue)]
  29.     #[Gedmo\Translatable]
  30.     private ?string $metaKeywords null;
  31.     #[ORM\Column(type'string',length160nullabletrue)]
  32.     #[Gedmo\Translatable]
  33.     private ?string $metaDescription null;
  34.     #[ORM\Column(type'text'nullabletrue)]
  35.     #[Gedmo\Translatable]
  36.     private ?string $body null;
  37.     #[ORM\Column(type'text'nullabletrue)]
  38.     #[Gedmo\Translatable]
  39.     private ?string $description null;
  40.     #[ORM\Column(type'string'nullabletrue)]
  41.     private ?string $image null;
  42.     #[ORM\Column(type'string'nullabletrue)]
  43.     private ?string $backgroundImage null;
  44.     #[ORM\Column(type'string'nullabletrue)]
  45.     private ?string $metaImage null;
  46.     #[ORM\Column(type'string'nullabletrue)]
  47.     #[Gedmo\Translatable]
  48.     private ?string $file null;
  49.     #[ORM\Column(type'json'nullabletrue)]
  50.     private ?array $images null;
  51.     #[ORM\Column(type'string'nullabletrue)]
  52.     private ?string $video null;
  53.     #[ORM\Column(type'string'nullabletrue)]
  54.     private ?string $pageVideo null;
  55.     #[ORM\Column(type'string'nullabletrue)]
  56.     private ?string $animation null;
  57.     public function getId(): ?int
  58.     {
  59.         return $this->id;
  60.     }
  61.     public function __toString(): string
  62.     {
  63.         return $this->title ?? "";
  64.     }
  65.     public function getSlug(): string
  66.     {
  67.         return $this->slug;
  68.     }
  69.     public function setSlug(string $slug): void
  70.     {
  71.         $this->slug $slug;
  72.     }
  73.     public function getTitle(): ?string
  74.     {
  75.         return $this->title;
  76.     }
  77.     public function setTitle(?string $title): void
  78.     {
  79.         $this->title $title;
  80.     }
  81.     public function getBody(): ?string
  82.     {
  83.         return $this->body;
  84.     }
  85.     public function setBody(?string $body): void
  86.     {
  87.         $this->body $body;
  88.     }
  89.     public function getDescription(): ?string
  90.     {
  91.         return $this->description;
  92.     }
  93.     public function setDescription(?string $description): void
  94.     {
  95.         $this->description $description;
  96.     }
  97.     public function getImage(): ?string
  98.     {
  99.         return $this->image;
  100.     }
  101.     public function setImage(?string $image): void
  102.     {
  103.         $this->image $image;
  104.     }
  105.     public function getImages(): ?array
  106.     {
  107.         return $this->images;
  108.     }
  109.     public function setImages(?array $images): void
  110.     {
  111.         $this->images $images;
  112.     }
  113.     public function getMetaTitle(): ?string
  114.     {
  115.         return $this->metaTitle;
  116.     }
  117.     public function setMetaTitle(?string $metaTitle): void
  118.     {
  119.         $this->metaTitle $metaTitle;
  120.     }
  121.     public function getMetaKeywords(): ?string
  122.     {
  123.         return $this->metaKeywords;
  124.     }
  125.     public function setMetaKeywords(?string $metaKeywords): void
  126.     {
  127.         $this->metaKeywords $metaKeywords;
  128.     }
  129.     public function getMetaDescription(): ?string
  130.     {
  131.         return $this->metaDescription;
  132.     }
  133.     public function setMetaDescription(?string $metaDescription): void
  134.     {
  135.         $this->metaDescription $metaDescription;
  136.     }
  137.     public function getMetaImage(): ?string
  138.     {
  139.         return $this->metaImage;
  140.     }
  141.     public function setMetaImage(?string $metaImage): void
  142.     {
  143.         $this->metaImage $metaImage;
  144.     }
  145.     public function getBackgroundImage(): ?string
  146.     {
  147.         return $this->backgroundImage;
  148.     }
  149.     public function setBackgroundImage(?string $backgroundImage): void
  150.     {
  151.         $this->backgroundImage $backgroundImage;
  152.     }
  153.     public function getFile(): ?string
  154.     {
  155.         return $this->file;
  156.     }
  157.     public function setFile(?string $file): void
  158.     {
  159.         $this->file $file;
  160.     }
  161.     public function getVideo(): ?string
  162.     {
  163.         return $this->video;
  164.     }
  165.     public function setVideo(?string $video): void
  166.     {
  167.         $this->video $video;
  168.     }
  169.     public function getAnimation(): ?string
  170.     {
  171.         return $this->animation;
  172.     }
  173.     public function setAnimation(?string $animation): void
  174.     {
  175.         $this->animation $animation;
  176.     }
  177.     public function getPageVideo(): ?string
  178.     {
  179.         return $this->pageVideo;
  180.     }
  181.     public function setPageVideo(?string $pageVideo): void
  182.     {
  183.         $this->pageVideo $pageVideo;
  184.     }
  185. }