src/Entity/Emplacement.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EmplacementRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass=EmplacementRepository::class)
  7. */
  8. class Emplacement
  9. {
  10. /**
  11. * @ORM\Id
  12. * @ORM\GeneratedValue
  13. * @ORM\Column(type="integer")
  14. */
  15. private $id;
  16. /**
  17. * @ORM\Column(type="string", length=255)
  18. */
  19. private $titre;
  20. /**
  21. * @ORM\Column(type="string", length=255)
  22. */
  23. private $adresse;
  24. /**
  25. * @ORM\Column(type="string", length=255)
  26. */
  27. private $telephone;
  28. /**
  29. * @ORM\Column(type="string", length=255)
  30. */
  31. private $email;
  32. /**
  33. * @ORM\Column(type="string", length=255,nullable=true)
  34. */
  35. private $image;
  36. /**
  37. * @ORM\Column(type="boolean")
  38. */
  39. private $afficherDansLeFooter;
  40. public function getId(): ?int
  41. {
  42. return $this->id;
  43. }
  44. public function getTitre(): ?string
  45. {
  46. return $this->titre;
  47. }
  48. public function setTitre(string $titre): self
  49. {
  50. $this->titre = $titre;
  51. return $this;
  52. }
  53. public function getAdresse(): ?string
  54. {
  55. return $this->adresse;
  56. }
  57. public function setAdresse(string $adresse): self
  58. {
  59. $this->adresse = $adresse;
  60. return $this;
  61. }
  62. public function getTelephone(): ?string
  63. {
  64. return $this->telephone;
  65. }
  66. public function setTelephone(string $telephone): self
  67. {
  68. $this->telephone = $telephone;
  69. return $this;
  70. }
  71. public function getEmail(): ?string
  72. {
  73. return $this->email;
  74. }
  75. public function setEmail(string $email): self
  76. {
  77. $this->email = $email;
  78. return $this;
  79. }
  80. public function getImage(): ?string
  81. {
  82. return $this->image;
  83. }
  84. public function setImage(?string $image): self
  85. {
  86. $this->image = $image;
  87. return $this;
  88. }
  89. public function getAfficherDansLeFooter(): ?bool
  90. {
  91. return $this->afficherDansLeFooter;
  92. }
  93. public function setAfficherDansLeFooter(bool $afficherDansLeFooter): self
  94. {
  95. $this->afficherDansLeFooter = $afficherDansLeFooter;
  96. return $this;
  97. }
  98. public function getAbsoluteImage() : ?string
  99. {
  100. if(!empty($this->image)){
  101. return sprintf("https://%s/images/upload/%s",$_SERVER['HTTP_HOST'],$this->image);
  102. }
  103. return null;
  104. }
  105. }