<?phpnamespace App\Entity;use App\Repository\EmplacementRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=EmplacementRepository::class) */class Emplacement{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $titre; /** * @ORM\Column(type="string", length=255) */ private $adresse; /** * @ORM\Column(type="string", length=255) */ private $telephone; /** * @ORM\Column(type="string", length=255) */ private $email; /** * @ORM\Column(type="string", length=255,nullable=true) */ private $image; /** * @ORM\Column(type="boolean") */ private $afficherDansLeFooter; public function getId(): ?int { return $this->id; } public function getTitre(): ?string { return $this->titre; } public function setTitre(string $titre): self { $this->titre = $titre; return $this; } public function getAdresse(): ?string { return $this->adresse; } public function setAdresse(string $adresse): self { $this->adresse = $adresse; return $this; } public function getTelephone(): ?string { return $this->telephone; } public function setTelephone(string $telephone): self { $this->telephone = $telephone; return $this; } public function getEmail(): ?string { return $this->email; } public function setEmail(string $email): self { $this->email = $email; return $this; } public function getImage(): ?string { return $this->image; } public function setImage(?string $image): self { $this->image = $image; return $this; } public function getAfficherDansLeFooter(): ?bool { return $this->afficherDansLeFooter; } public function setAfficherDansLeFooter(bool $afficherDansLeFooter): self { $this->afficherDansLeFooter = $afficherDansLeFooter; return $this; } public function getAbsoluteImage() : ?string { if(!empty($this->image)){ return sprintf("https://%s/images/upload/%s",$_SERVER['HTTP_HOST'],$this->image); } return null; }}