<?phpnamespace App\Entity;use App\Repository\VilleDesservieRepository;use Doctrine\ORM\Mapping as ORM;use Cocur\Slugify\Slugify;/** * @ORM\Entity(repositoryClass=VilleDesservieRepository::class) */class VilleDesservie{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $title; /** * @ORM\Column(type="text", nullable=true) */ private $bottomDescription; /** * @ORM\Column(type="text", nullable=true) */ private $topDescription; /** * @ORM\Column(type="boolean", nullable=true) */ private $isActive; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $slug; public function getId(): ?int { return $this->id; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): self { $this->title = $title; $slugify = new Slugify(); $this->slug = $slugify->Slugify($title,'_'); return $this; } public function getBottomDescription(): ?string { return $this->bottomDescription; } public function setBottomDescription(?string $bottomDescription): self { $this->bottomDescription = $bottomDescription; return $this; } public function getTopDescription(): ?string { return $this->topDescription; } public function setTopDescription(?string $topDescription): self { $this->topDescription = $topDescription; return $this; } public function getIsActive(): ?bool { return $this->isActive; } public function setIsActive(?bool $isActive): self { $this->isActive = $isActive; return $this; } public function getSlug(): ?string { return $this->slug; } public function setSlug(?string $slug): self { $this->slug = $slug; return $this; }}