src/Entity/Services.php line 14

  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Trait\MainTranslationTrait;
  4. use App\Entity\Translation\ServicesTranslation;
  5. use App\Repository\ServicesRepository;
  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(repositoryClassServicesRepository::class)]
  11. class Services implements Translatable
  12. {
  13.     use MainTranslationTrait;
  14.     const TRANSLATION_ENTITY ServicesTranslation::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 null;
  22.     #[ORM\Column(type'string',nullabletruelength500)]
  23.     #[Gedmo\Translatable]
  24.     private ?string $shortDescription null;
  25.     #[ORM\Column(type'string',nullabletrue)]
  26.     private ?string $image null;
  27.     #[ORM\Column(type'text',nullabletrue)]
  28.     #[Gedmo\Translatable]
  29.     private mixed $description null;
  30.     #[Gedmo\Slug(fields: ['title'], updatablefalse)]
  31.     #[ORM\Column(type'string'uniquetruenullabletrue)]
  32.     private string $slug;
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     /**
  38.      * @return string|null
  39.      */
  40.     public function getTitle()
  41.     {
  42.         return $this->title;
  43.     }
  44.     /**
  45.      * @param string|null $title
  46.      */
  47.     public function setTitle($title)
  48.     {
  49.         $this->title $title;
  50.     }
  51.     /**
  52.      * @return string|null
  53.      */
  54.     public function getShortDescription()
  55.     {
  56.         return $this->shortDescription;
  57.     }
  58.     /**
  59.      * @param string|null $shortDescription
  60.      */
  61.     public function setShortDescription($shortDescription)
  62.     {
  63.         $this->shortDescription $shortDescription;
  64.     }
  65.     /**
  66.      * @return string|null
  67.      */
  68.     public function getImage()
  69.     {
  70.         return $this->image;
  71.     }
  72.     /**
  73.      * @param string|null $image
  74.      */
  75.     public function setImage($image)
  76.     {
  77.         $this->image $image;
  78.     }
  79.     /**
  80.      * @return mixed|null
  81.      */
  82.     public function getDescription()
  83.     {
  84.         return $this->description;
  85.     }
  86.     /**
  87.      * @param mixed|null $description
  88.      */
  89.     public function setDescription($description)
  90.     {
  91.         $this->description $description;
  92.     }
  93.     public function getSlug(): ?string
  94.     {
  95.         return $this->slug;
  96.     }
  97.     public function setSlug(string $slug): static
  98.     {
  99.         $this->slug $slug;
  100.         return $this;
  101.     }
  102. }