src/Entity/Library.php line 14

  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Trait\MainTranslationTrait;
  4. use App\Entity\Translation\LibraryTranslation;
  5. use App\Repository\LibraryRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Translatable\Translatable;
  8. use Gedmo\Mapping\Annotation as Gedmo;
  9. #[Gedmo\TranslationEntity(class: self::TRANSLATION_ENTITY)]
  10. #[ORM\Entity(repositoryClassLibraryRepository::class)]
  11. class Library implements Translatable
  12. {
  13.     use MainTranslationTrait;
  14.     const TRANSLATION_ENTITY LibraryTranslation::class;
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column]
  18.     private ?int $id null;
  19.     #[ORM\Column(type'string',nullabletrue)]
  20.     #[Gedmo\Translatable]
  21.     private ?string $title;
  22.     #[ORM\Column(type'string',nullabletrue)]
  23.     #[Gedmo\Translatable]
  24.     private ?string $creator;
  25.     #[ORM\Column(type'string',nullabletrue)]
  26.     private ?string $year;
  27.     #[ORM\Column(type'string',nullabletrue)]
  28.     private ?string $image;
  29.     #[ORM\Column(type'string'length65nullabletrue)]
  30.     #[Gedmo\Translatable]
  31.     private ?string $metaTitle null;
  32.     #[ORM\Column(type'string',length165,nullabletrue)]
  33.     #[Gedmo\Translatable]
  34.     private ?string $metaDescription null;
  35.     #[ORM\Column(type'string',nullabletrue)]
  36.     private ?string $metaImage null;
  37.     #[ORM\Column(type'text',nullabletrue)]
  38.     #[Gedmo\Translatable]
  39.     private mixed $description;
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     /**
  45.      * @return string|null
  46.      */
  47.     public function getTitle(): ?string
  48.     {
  49.         return $this->title;
  50.     }
  51.     /**
  52.      * @param string|null $title
  53.      */
  54.     public function setTitle(?string $title): void
  55.     {
  56.         $this->title $title;
  57.     }
  58.     /**
  59.      * @return string|null
  60.      */
  61.     public function getCreator(): ?string
  62.     {
  63.         return $this->creator;
  64.     }
  65.     /**
  66.      * @param string|null $creator
  67.      */
  68.     public function setCreator(?string $creator): void
  69.     {
  70.         $this->creator $creator;
  71.     }
  72.     /**
  73.      * @return string|null
  74.      */
  75.     public function getYear(): ?string
  76.     {
  77.         return $this->year;
  78.     }
  79.     /**
  80.      * @param string|null $year
  81.      */
  82.     public function setYear(?string $year): void
  83.     {
  84.         $this->year $year;
  85.     }
  86.     /**
  87.      * @return string|null
  88.      */
  89.     public function getImage(): ?string
  90.     {
  91.         return $this->image;
  92.     }
  93.     /**
  94.      * @param string|null $image
  95.      */
  96.     public function setImage(?string $image): void
  97.     {
  98.         $this->image $image;
  99.     }
  100.     /**
  101.      * @return string|null
  102.      */
  103.     public function getMetaTitle(): ?string
  104.     {
  105.         return $this->metaTitle;
  106.     }
  107.     /**
  108.      * @param string|null $metaTitle
  109.      */
  110.     public function setMetaTitle(?string $metaTitle): void
  111.     {
  112.         $this->metaTitle $metaTitle;
  113.     }
  114.     /**
  115.      * @return string|null
  116.      */
  117.     public function getMetaDescription(): ?string
  118.     {
  119.         return $this->metaDescription;
  120.     }
  121.     /**
  122.      * @param string|null $metaDescription
  123.      */
  124.     public function setMetaDescription(?string $metaDescription): void
  125.     {
  126.         $this->metaDescription $metaDescription;
  127.     }
  128.     /**
  129.      * @return string|null
  130.      */
  131.     public function getMetaImage(): ?string
  132.     {
  133.         return $this->metaImage;
  134.     }
  135.     /**
  136.      * @param string|null $metaImage
  137.      */
  138.     public function setMetaImage(?string $metaImage): void
  139.     {
  140.         $this->metaImage $metaImage;
  141.     }
  142.     /**
  143.      * @return mixed
  144.      */
  145.     public function getDescription(): mixed
  146.     {
  147.         return $this->description;
  148.     }
  149.     /**
  150.      * @param mixed $description
  151.      */
  152.     public function setDescription(mixed $description): void
  153.     {
  154.         $this->description $description;
  155.     }
  156. }