src/Entity/Services.php line 15

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