<?php
namespace App\Entity;
use App\Repository\PageRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PageRepository::class)]
class Page
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private $uri;
#[ORM\ManyToOne(targetEntity: Parameters::class, inversedBy: 'pages')]
#[ORM\JoinColumn(nullable: false)]
private $parameter;
#[ORM\Column(type: 'string', length: 255)]
private $template;
#[ORM\Column(type: 'boolean', options: ['default' => 1])]
private $active=true;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $title;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $description;
public function getId(): ?int
{
return $this->id;
}
public function getUri(): ?string
{
return $this->uri;
}
public function setUri(string $uri): self
{
$this->uri = strtolower(str_replace('/', '', $uri));
return $this;
}
public function getParameter(): ?Parameters
{
return $this->parameter;
}
public function setParameter(?Parameters $parameter): self
{
$this->parameter = $parameter;
return $this;
}
public function getTemplate(): ?string
{
return $this->template;
}
public function setTemplate(string $template): self
{
$this->template = $template;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(?bool $active): self
{
$this->active = $active;
return $this;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
}