src/Entity/Office.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OfficeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=OfficeRepository::class)
  9.  */
  10. class Office
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $titre;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $adresse;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private $telephone;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $image;
  34.     /**
  35.      * @ORM\Column(type="text")
  36.      */
  37.     private $presentation;
  38.     /**
  39.      * @ORM\Column(type="text", nullable=true)
  40.      */
  41.     private $metro;
  42.     /**
  43.      * @ORM\Column(type="text", nullable=true)
  44.      */
  45.     private $bus;
  46.     /**
  47.      * @ORM\Column(type="text", nullable=true)
  48.      */
  49.     private $parking;
  50.     /**
  51.      * @ORM\OneToMany(targetEntity=Avis::class, mappedBy="office", orphanRemoval=true)
  52.      */
  53.     private $avis;
  54.     /**
  55.      * @ORM\Column(type="text", nullable=true)
  56.      */
  57.     private $accesPmr;
  58.     /**
  59.      * @ORM\Column(type="text")
  60.      */
  61.     private $map;
  62.     /**
  63.      * @ORM\Column(type="string", length=255)
  64.      */
  65.     private $imageBleu;
  66.     /**
  67.      * @ORM\OneToMany(targetEntity=Offre::class, mappedBy="lieu", orphanRemoval=true)
  68.      */
  69.     private $offres;
  70.     /**
  71.      * @ORM\Column(type="string", length=255)
  72.      */
  73.     private $slug;
  74.     public function __construct()
  75.     {
  76.         $this->avis = new ArrayCollection();
  77.         $this->offres = new ArrayCollection();
  78.     }
  79.     public function getId(): ?int
  80.     {
  81.         return $this->id;
  82.     }
  83.     public function getTitre(): ?string
  84.     {
  85.         return $this->titre;
  86.     }
  87.     public function setTitre(string $titre): self
  88.     {
  89.         $this->titre $titre;
  90.         return $this;
  91.     }
  92.     public function getAdresse(): ?string
  93.     {
  94.         return $this->adresse;
  95.     }
  96.     public function setAdresse(string $adresse): self
  97.     {
  98.         $this->adresse $adresse;
  99.         return $this;
  100.     }
  101.     public function getTelephone(): ?string
  102.     {
  103.         return $this->telephone;
  104.     }
  105.     public function setTelephone(string $telephone): self
  106.     {
  107.         $this->telephone $telephone;
  108.         return $this;
  109.     }
  110.     public function getImage(): ?string
  111.     {
  112.         return $this->image;
  113.     }
  114.     public function setImage(string $image): self
  115.     {
  116.         $this->image $image;
  117.         return $this;
  118.     }
  119.     public function getPresentation(): ?string
  120.     {
  121.         return $this->presentation;
  122.     }
  123.     public function setPresentation(string $presentation): self
  124.     {
  125.         $this->presentation $presentation;
  126.         return $this;
  127.     }
  128.     public function getMetro(): ?string
  129.     {
  130.         return $this->metro;
  131.     }
  132.     public function setMetro(?string $metro): self
  133.     {
  134.         $this->metro $metro;
  135.         return $this;
  136.     }
  137.     public function getBus(): ?string
  138.     {
  139.         return $this->bus;
  140.     }
  141.     public function setBus(?string $bus): self
  142.     {
  143.         $this->bus $bus;
  144.         return $this;
  145.     }
  146.     public function getParking(): ?string
  147.     {
  148.         return $this->parking;
  149.     }
  150.     public function setParking(?string $parking): self
  151.     {
  152.         $this->parking $parking;
  153.         return $this;
  154.     }
  155.     /**
  156.      * @return Collection<int, Avis>
  157.      */
  158.     public function getAvis(): Collection
  159.     {
  160.         return $this->avis;
  161.     }
  162.     public function addAvi(Avis $avi): self
  163.     {
  164.         if (!$this->avis->contains($avi)) {
  165.             $this->avis[] = $avi;
  166.             $avi->setOffice($this);
  167.         }
  168.         return $this;
  169.     }
  170.     public function removeAvi(Avis $avi): self
  171.     {
  172.         if ($this->avis->removeElement($avi)) {
  173.             // set the owning side to null (unless already changed)
  174.             if ($avi->getOffice() === $this) {
  175.                 $avi->setOffice(null);
  176.             }
  177.         }
  178.         return $this;
  179.     }
  180.     public function getAccesPmr(): ?string
  181.     {
  182.         return $this->accesPmr;
  183.     }
  184.     public function setAccesPmr(string $accesPmr): self
  185.     {
  186.         $this->accesPmr $accesPmr;
  187.         return $this;
  188.     }
  189.     public function __toString()
  190.     {
  191.         return $this->getTitre();
  192.     }
  193.     public function getMap(): ?string
  194.     {
  195.         return $this->map;
  196.     }
  197.     public function setMap(string $map): self
  198.     {
  199.         $this->map $map;
  200.         return $this;
  201.     }
  202.     public function getImageBleu(): ?string
  203.     {
  204.         return $this->imageBleu;
  205.     }
  206.     public function setImageBleu(string $imageBleu): self
  207.     {
  208.         $this->imageBleu $imageBleu;
  209.         return $this;
  210.     }
  211.     /**
  212.      * @return Collection<int, Offre>
  213.      */
  214.     public function getOffres(): Collection
  215.     {
  216.         return $this->offres;
  217.     }
  218.     public function addOffre(Offre $offre): self
  219.     {
  220.         if (!$this->offres->contains($offre)) {
  221.             $this->offres[] = $offre;
  222.             $offre->setLieu($this);
  223.         }
  224.         return $this;
  225.     }
  226.     public function removeOffre(Offre $offre): self
  227.     {
  228.         if ($this->offres->removeElement($offre)) {
  229.             // set the owning side to null (unless already changed)
  230.             if ($offre->getLieu() === $this) {
  231.                 $offre->setLieu(null);
  232.             }
  233.         }
  234.         return $this;
  235.     }
  236.     public function getSlug(): ?string
  237.     {
  238.         return $this->slug;
  239.     }
  240.     public function setSlug(string $slug): self
  241.     {
  242.         $this->slug $slug;
  243.         return $this;
  244.     }
  245. }