src/Entity/Page.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PageRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use Gedmo\Translatable\Translatable;
  8. #[ORM\Entity(repositoryClass: PageRepository::class)]
  9. class Page implements Translatable
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id = null;
  15.     #[Gedmo\Translatable]
  16.     #[ORM\Column(length: 255)]
  17.     private ?string $title = null;
  18.     #[ORM\Column(length: 255)]
  19.     private ?string $slug = null;
  20.     #[Gedmo\Translatable]
  21.     #[ORM\Column(type: Types::TEXT, nullable: true)]
  22.     private ?string $headline = null;
  23.     #[Gedmo\Translatable]
  24.     #[ORM\Column(type: Types::TEXT, nullable: true)]
  25.     private ?string $content = null;
  26.     #[Gedmo\Translatable]
  27.     #[ORM\Column]
  28.     private ?bool $visible = null;
  29.     #[Gedmo\Locale]
  30.     private string $locale = '';
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getTitle(): ?string
  36.     {
  37.         return $this->title;
  38.     }
  39.     public function setTitle(string $title): self
  40.     {
  41.         $this->title = $title;
  42.         return $this;
  43.     }
  44.     public function getSlug(): ?string
  45.     {
  46.         return $this->slug;
  47.     }
  48.     public function setSlug(string $slug): self
  49.     {
  50.         $this->slug = $slug;
  51.         return $this;
  52.     }
  53.     public function getHeadline(): ?string
  54.     {
  55.         return $this->headline;
  56.     }
  57.     public function setHeadline(?string $headline): self
  58.     {
  59.         $this->headline = $headline;
  60.         return $this;
  61.     }
  62.     public function getContent(): ?string
  63.     {
  64.         return $this->content;
  65.     }
  66.     public function setContent(?string $content): self
  67.     {
  68.         $this->content = $content;
  69.         return $this;
  70.     }
  71.     public function isVisible(): ?bool
  72.     {
  73.         return $this->visible;
  74.     }
  75.     public function setVisible(bool $visible): self
  76.     {
  77.         $this->visible = $visible;
  78.         return $this;
  79.     }
  80.     public function setTranslatableLocale($locale): void
  81.     {
  82.         $this->locale = $locale;
  83.     }
  84. }