src/Entity/PageComponent.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\TimestampableTrait;
  4. use App\Repository\PageComponentRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassPageComponentRepository::class)]
  8. class PageComponent
  9. {
  10.     use TimestampableTrait;
  11.     public const PAGE_TYPE_HEADER 'header';
  12.     public const PAGE_TYPE_FOOTER 'footer';
  13.     public const PAGE_TYPE_SCRIPT 'script';
  14.     public const PAGE_TYPE_HEAD 'head';
  15.     public const PAGE_COMPONENT_TYPES = [
  16.         self::PAGE_TYPE_HEADER,
  17.         self::PAGE_TYPE_FOOTER,
  18.         self::PAGE_TYPE_SCRIPT,
  19.         self::PAGE_TYPE_HEAD
  20.     ];
  21.     #[ORM\Id]
  22.     #[ORM\GeneratedValue]
  23.     #[ORM\Column]
  24.     private ?int $id null;
  25.     #[ORM\Column(length20)]
  26.     private ?string $type null;
  27.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  28.     private ?string $Content null;
  29.     public function getId(): ?int
  30.     {
  31.         return $this->id;
  32.     }
  33.     public function getType(): ?string
  34.     {
  35.         return $this->type;
  36.     }
  37.     public function setType(string $type): self
  38.     {
  39.         $this->type $type;
  40.         return $this;
  41.     }
  42.     public function getContent(): ?string
  43.     {
  44.         return $this->Content;
  45.     }
  46.     public function setContent(?string $Content): self
  47.     {
  48.         $this->Content $Content;
  49.         return $this;
  50.     }
  51. }