<?php
namespace App\Entity;
use App\Repository\NosGarantiesRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=NosGarantiesRepository::class)
*/
class NosGaranties
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $icone;
/**
* @ORM\Column(type="string", length=255)
*/
private $titre;
/**
* @ORM\Column(type="text")
*/
private $contenu;
/**
* @ORM\Column(type="boolean")
*/
private $plier;
public function getId(): ?int
{
return $this->id;
}
public function getIcone(): ?string
{
return $this->icone;
}
public function setIcone(string $icone): self
{
$this->icone = $icone;
return $this;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getContenu(): ?string
{
return $this->contenu;
}
public function setContenu(string $contenu): self
{
$this->contenu = $contenu;
return $this;
}
public function getDisplayContent(){
$pattern = '/h1/i';
$replacement = 'h2';
return preg_replace($pattern, $replacement, $this->contenu);
}
public function getPlier(): ?bool
{
return $this->plier;
}
public function setPlier(bool $plier): self
{
$this->plier = $plier;
return $this;
}
}