src/Entity/Page.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PageRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassPageRepository::class)]
  6. class Page
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\Column(type'string'length255)]
  13.     private $uri;
  14.     #[ORM\ManyToOne(targetEntityParameters::class, inversedBy'pages')]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private $parameter;
  17.     #[ORM\Column(type'string'length255)]
  18.     private $template;
  19.     #[ORM\Column(type'boolean'options: ['default' => 1])]
  20.     private $active=true;
  21.     #[ORM\Column(type'string'length255nullabletrue)]
  22.     private $title;
  23.     #[ORM\Column(type'string'length255nullabletrue)]
  24.     private $description;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getUri(): ?string
  30.     {
  31.         return $this->uri;
  32.     }
  33.     public function setUri(string $uri): self
  34.     {
  35.         $this->uri strtolower(str_replace('/'''$uri));
  36.         return $this;
  37.     }
  38.     public function getParameter(): ?Parameters
  39.     {
  40.         return $this->parameter;
  41.     }
  42.     public function setParameter(?Parameters $parameter): self
  43.     {
  44.         $this->parameter $parameter;
  45.         return $this;
  46.     }
  47.     public function getTemplate(): ?string
  48.     {
  49.         return $this->template;
  50.     }
  51.     public function setTemplate(string $template): self
  52.     {
  53.         $this->template $template;
  54.         return $this;
  55.     }
  56.     public function getActive(): ?bool
  57.     {
  58.         return $this->active;
  59.     }
  60.     public function setActive(?bool $active): self
  61.     {
  62.         $this->active $active;
  63.         return $this;
  64.     }
  65.     public function getTitle(): ?string
  66.     {
  67.         return $this->title;
  68.     }
  69.     public function setTitle(?string $title): self
  70.     {
  71.         $this->title $title;
  72.         return $this;
  73.     }
  74.     public function getDescription(): ?string
  75.     {
  76.         return $this->description;
  77.     }
  78.     public function setDescription(?string $description): self
  79.     {
  80.         $this->description $description;
  81.         return $this;
  82.     }
  83. }