src/Entity/BasePage.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\LifecycleTrait;
  4. use App\Repository\BasePageRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassBasePageRepository::class)]
  7. class BasePage
  8. {
  9.     use LifecycleTrait;
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private int $id;
  14.     #[ORM\Column(type'string'length255)]
  15.     private ?string $title;
  16.     #[ORM\Column(type'text')]
  17.     private ?string $body;
  18.     #[ORM\Column(type'string'length255)]
  19.     private ?string $slug;
  20.     #[ORM\Column(type'boolean')]
  21.     private ?bool $published;
  22.     public function __construct()
  23.     {
  24.         $this->published 1;
  25.         $this->lifeCycleTraitInit();
  26.     }
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getTitle(): ?string
  32.     {
  33.         return $this->title;
  34.     }
  35.     public function setTitle(string $title): self
  36.     {
  37.         $this->title $title;
  38.         return $this;
  39.     }
  40.     public function getBody(): ?string
  41.     {
  42.         return $this->body;
  43.     }
  44.     public function setBody(string $body): self
  45.     {
  46.         $this->body $body;
  47.         return $this;
  48.     }
  49.     public function getSlug(): ?string
  50.     {
  51.         return $this->slug;
  52.     }
  53.     public function setSlug(string $slug): self
  54.     {
  55.         $this->slug $slug;
  56.         return $this;
  57.     }
  58.     public function getPublished(): ?bool
  59.     {
  60.         return $this->published;
  61.     }
  62.     public function setPublished(bool $published): self
  63.     {
  64.         $this->published $published;
  65.         return $this;
  66.     }
  67. }