src/Entity/SpecialOffers.php line 15

  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Trait\MainTranslationTrait;
  4. use App\Entity\Translation\SpecialOffersTranslation;
  5. use App\Repository\SpecialOffersRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. use Gedmo\Translatable\Translatable;
  9. #[ORM\Table(name'special_offers')]
  10. #[ORM\Entity(repositoryClassSpecialOffersRepository::class)]
  11. #[Gedmo\TranslationEntity(class: SpecialOffersTranslation::class)]
  12. class SpecialOffers implements Translatable
  13. {
  14.     use MainTranslationTrait;
  15.     const TRANSLATION_ENTITY SpecialOffersTranslation::class;
  16.     #[ORM\Id]
  17.     #[ORM\GeneratedValue]
  18.     #[ORM\Column]
  19.     private ?int $id null;
  20.     #[ORM\Column(type'string'nullabletrue)]
  21.     #[Gedmo\Translatable]
  22.     private ?string $title null;
  23.     #[ORM\Column(type'string',uniquetrue)]
  24.     #[Gedmo\Slug(fields: ['title'])]
  25.     private string $slug;
  26.     #[ORM\Column(type'text'nullabletrue)]
  27.     #[Gedmo\Translatable]
  28.     private ?string $body null;
  29.     #[ORM\Column(type'text'nullabletrue)]
  30.     #[Gedmo\Translatable]
  31.     private ?string $additionalInfo null;
  32.     #[ORM\Column(type'string'nullabletrue)]
  33.     #[Gedmo\Translatable]
  34.     private ?string $buttonText null;
  35.     #[ORM\Column(type'string'nullabletrue)]
  36.     private ?string $buttonSlug null;
  37.     #[ORM\Column(type'string'nullabletrue)]
  38.     #[Gedmo\Translatable]
  39.     private ?string $image null;
  40.     #[ORM\Column(type'string'nullabletrue)]
  41.     private ?string $video null;
  42.     #[ORM\Column(type'string'nullabletrue)]
  43.     private ?string $file null;
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function __toString(): string
  49.     {
  50.         return $this->title ?? "";
  51.     }
  52.     public function getTitle(): ?string
  53.     {
  54.         return $this->title;
  55.     }
  56.     public function setTitle(?string $title): void
  57.     {
  58.         $this->title $title;
  59.     }
  60.     public function getSlug(): string
  61.     {
  62.         return $this->slug;
  63.     }
  64.     public function setSlug(string $slug): void
  65.     {
  66.         $this->slug $slug;
  67.     }
  68.     public function getBody(): ?string
  69.     {
  70.         return $this->body;
  71.     }
  72.     public function setBody(?string $body): void
  73.     {
  74.         $this->body $body;
  75.     }
  76.     public function getImage(): ?string
  77.     {
  78.         return $this->image;
  79.     }
  80.     public function setImage(?string $image): void
  81.     {
  82.         $this->image $image;
  83.     }
  84.     public function getVideo(): ?string
  85.     {
  86.         return $this->video;
  87.     }
  88.     public function setVideo(?string $video): void
  89.     {
  90.         $this->video $video;
  91.     }
  92.     public function getButtonText(): ?string
  93.     {
  94.         return $this->buttonText;
  95.     }
  96.     public function setButtonText(?string $buttonText): void
  97.     {
  98.         $this->buttonText $buttonText;
  99.     }
  100.     public function getButtonSlug(): ?string
  101.     {
  102.         return $this->buttonSlug;
  103.     }
  104.     public function setButtonSlug(?string $buttonSlug): void
  105.     {
  106.         $this->buttonSlug $buttonSlug;
  107.     }
  108.     public function getAdditionalInfo(): ?string
  109.     {
  110.         return $this->additionalInfo;
  111.     }
  112.     public function setAdditionalInfo(?string $additionalInfo): void
  113.     {
  114.         $this->additionalInfo $additionalInfo;
  115.     }
  116.     public function getFile(): ?string
  117.     {
  118.         return $this->file;
  119.     }
  120.     public function setFile(?string $file): void
  121.     {
  122.         $this->file $file;
  123.     }
  124. }