src/Entity/FrontPage.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FrontPageRepository;
  4. use App\Trait\SearchEngineOptimization;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. #[ORM\Entity(repositoryClassFrontPageRepository::class)]
  9. class FrontPage
  10. {
  11.     use SearchEngineOptimization;
  12.     public const HOME_PAGE "home";
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $slug null;
  19.     #[Gedmo\Translatable]
  20.     #[ORM\Column(length128nullabletrue)]
  21.     private ?string $title null;
  22.     #[Gedmo\Translatable]
  23.     #[ORM\Column(typeTypes::TEXT)]
  24.     private ?string $description null;
  25.     #[Gedmo\Translatable]
  26.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  27.     private ?string $content null;
  28.     #[ORM\Column]
  29.     private ?bool $active null;
  30.     #[ORM\Column]
  31.     private ?bool $editable null;
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getSlug(): ?string
  37.     {
  38.         return $this->slug;
  39.     }
  40.     public function setSlug(string $slug): static
  41.     {
  42.         $this->slug $slug;
  43.         return $this;
  44.     }
  45.     public function getTitle(): ?string
  46.     {
  47.         return $this->title;
  48.     }
  49.     public function setTitle(string $title): static
  50.     {
  51.         $this->title $title;
  52.         return $this;
  53.     }
  54.     public function getDescription(): ?string
  55.     {
  56.         return $this->description;
  57.     }
  58.     public function setDescription(string $description): static
  59.     {
  60.         $this->description $description;
  61.         return $this;
  62.     }
  63.     public function getContent(): ?string
  64.     {
  65.         return $this->content;
  66.     }
  67.     public function setContent(?string $content): static
  68.     {
  69.         $this->content $content;
  70.         return $this;
  71.     }
  72.     public function isActive(): ?bool
  73.     {
  74.         return $this->active;
  75.     }
  76.     public function setActive(bool $active): static
  77.     {
  78.         $this->active $active;
  79.         return $this;
  80.     }
  81.     public function __toString(): string
  82.     {
  83.         return $this->getTitle();
  84.     }
  85.     public function isEditable(): ?bool
  86.     {
  87.         return $this->editable;
  88.     }
  89.     public function setEditable(?bool $editable): void
  90.     {
  91.         $this->editable $editable;
  92.     }
  93. }