src/Entity/Halls.php line 15

  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Trait\MainTranslationTrait;
  4. use App\Entity\Translation\HallsTranslation;
  5. use App\Repository\HallsRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. use Gedmo\Translatable\Translatable;
  9. #[ORM\Table(name'halls')]
  10. #[ORM\Entity(repositoryClassHallsRepository::class)]
  11. #[Gedmo\TranslationEntity(class: HallsTranslation::class)]
  12. class Halls implements Translatable
  13. {
  14.     use MainTranslationTrait;
  15.     const TRANSLATION_ENTITY HallsTranslation::class;
  16.     #[ORM\Id]
  17.     #[ORM\GeneratedValue]
  18.     #[ORM\Column]
  19.     private ?int $id null;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     #[ORM\Column(type'string'nullabletrue)]
  25.     #[Gedmo\Translatable]
  26.     private ?string $title null;
  27.     #[ORM\Column(type'string'nullabletrue)]
  28.     private ?string $image null;
  29.     public function __toString(): string
  30.     {
  31.         return $this->title ?? "";
  32.     }
  33.     public function getTitle(): ?string
  34.     {
  35.         return $this->title;
  36.     }
  37.     public function setTitle(?string $title): static
  38.     {
  39.         $this->title $title;
  40.         return $this;
  41.     }
  42.     public function getImage(): ?string
  43.     {
  44.         return $this->image;
  45.     }
  46.     public function setImage(?string $image): static
  47.     {
  48.         $this->image $image;
  49.         return $this;
  50.     }
  51. }