src/Entity/CustomPage.php line 14

Open in your IDE?
  1. <?php
  2.     namespace App\Entity;
  3.     use App\Repository\CustomPageRepository;
  4.     use App\Traits\DateTrait;
  5.     use Doctrine\ORM\Mapping as ORM;
  6.     use JMS\Serializer\Annotation\Expose;
  7.     use JMS\Serializer\Annotation\Groups;
  8.     /**
  9.      * @ORM\Entity(repositoryClass=CustomPageRepository::class)
  10.      */
  11.     class CustomPage
  12.     {
  13.         /**
  14.          * @ORM\Id
  15.          * @ORM\GeneratedValue
  16.          * @ORM\Column(type="integer")
  17.          *
  18.          * @Expose
  19.          * @Groups({"get:read"})
  20.          */
  21.         private ?int $id NULL;
  22.         /**
  23.          * @ORM\Column(type="string", length=255)
  24.          *
  25.          * @Expose
  26.          * @Groups({"get:read"})
  27.          */
  28.         private string $title;
  29.         /**
  30.          * @ORM\Column(type="text")
  31.          *
  32.          * @Expose
  33.          * @Groups({"get:read"})
  34.          */
  35.         private string $content;
  36.         /**
  37.          * @ORM\Column(type="text")
  38.          */
  39.         private string $editableContent;
  40.         /**
  41.          * @ORM\Column(type="boolean", options={"default": false})
  42.          *
  43.          * @Expose
  44.          * @Groups({"get:read"})
  45.          */
  46.         private bool $enabled FALSE;
  47.         /**
  48.          * @ORM\Column(type="boolean", options={"default": false})
  49.          *
  50.          * @Expose
  51.          * @Groups({"get:read"})
  52.          */
  53.         private bool $root FALSE;
  54.         /**
  55.          * @ORM\Column(type="integer", nullable=true)
  56.          *
  57.          * @Expose
  58.          * @Groups({"get:read"})
  59.          */
  60.         private ?int $positionInMenu NULL;
  61.         /**
  62.          * @ORM\Column(type="string", length=255, nullable=true)
  63.          *
  64.          * @Expose
  65.          * @Groups({"get:read"})
  66.          */
  67.         private $subdomain;
  68.         use DateTrait;
  69.         public function getId(): ?int
  70.         {
  71.             return $this->id;
  72.         }
  73.         public function getTitle(): string
  74.         {
  75.             return $this->title;
  76.         }
  77.         public function setTitle(string $title): self
  78.         {
  79.             $this->title $title;
  80.             return $this;
  81.         }
  82.         public function getContent(): string
  83.         {
  84.             return $this->content;
  85.         }
  86.         public function setContent(string $content): self
  87.         {
  88.             $this->content $content;
  89.             return $this;
  90.         }
  91.         public function getEditableContent(): string
  92.         {
  93.             return $this->editableContent;
  94.         }
  95.         public function setEditableContent(string $editableContent): self
  96.         {
  97.             $this->editableContent $editableContent;
  98.             return $this;
  99.         }
  100.         public function isEnabled(): bool
  101.         {
  102.             return $this->enabled;
  103.         }
  104.         public function setEnabled(bool $enabled): self
  105.         {
  106.             $this->enabled $enabled;
  107.             return $this;
  108.         }
  109.         public function getPositionInMenu(): ?int
  110.         {
  111.             return $this->positionInMenu;
  112.         }
  113.         public function setPositionInMenu(?int $positionInMenu): self
  114.         {
  115.             $this->positionInMenu $positionInMenu;
  116.             return $this;
  117.         }
  118.         public function isRoot(): bool
  119.         {
  120.             return $this->root;
  121.         }
  122.         public function setRoot(bool $root): self
  123.         {
  124.             $this->root $root;
  125.             return $this;
  126.         }
  127.         public function getSubdomain(): ?string
  128.         {
  129.             return $this->subdomain;
  130.         }
  131.         public function setSubdomain(string $subdomain): self
  132.         {
  133.             $this->subdomain $subdomain;
  134.             return $this;
  135.         }
  136.     }