<?php
namespace App\Entity;
use App\Repository\OfficeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=OfficeRepository::class)
*/
class Office
{
/**
* @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 $image;
/**
* @ORM\Column(type="text")
*/
private $presentation;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $metro;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $bus;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $parking;
/**
* @ORM\OneToMany(targetEntity=Avis::class, mappedBy="office", orphanRemoval=true)
*/
private $avis;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $accesPmr;
/**
* @ORM\Column(type="text")
*/
private $map;
/**
* @ORM\Column(type="string", length=255)
*/
private $imageBleu;
/**
* @ORM\OneToMany(targetEntity=Offre::class, mappedBy="lieu", orphanRemoval=true)
*/
private $offres;
/**
* @ORM\Column(type="string", length=255)
*/
private $slug;
public function __construct()
{
$this->avis = new ArrayCollection();
$this->offres = new ArrayCollection();
}
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 getImage(): ?string
{
return $this->image;
}
public function setImage(string $image): self
{
$this->image = $image;
return $this;
}
public function getPresentation(): ?string
{
return $this->presentation;
}
public function setPresentation(string $presentation): self
{
$this->presentation = $presentation;
return $this;
}
public function getMetro(): ?string
{
return $this->metro;
}
public function setMetro(?string $metro): self
{
$this->metro = $metro;
return $this;
}
public function getBus(): ?string
{
return $this->bus;
}
public function setBus(?string $bus): self
{
$this->bus = $bus;
return $this;
}
public function getParking(): ?string
{
return $this->parking;
}
public function setParking(?string $parking): self
{
$this->parking = $parking;
return $this;
}
/**
* @return Collection<int, Avis>
*/
public function getAvis(): Collection
{
return $this->avis;
}
public function addAvi(Avis $avi): self
{
if (!$this->avis->contains($avi)) {
$this->avis[] = $avi;
$avi->setOffice($this);
}
return $this;
}
public function removeAvi(Avis $avi): self
{
if ($this->avis->removeElement($avi)) {
// set the owning side to null (unless already changed)
if ($avi->getOffice() === $this) {
$avi->setOffice(null);
}
}
return $this;
}
public function getAccesPmr(): ?string
{
return $this->accesPmr;
}
public function setAccesPmr(string $accesPmr): self
{
$this->accesPmr = $accesPmr;
return $this;
}
public function __toString()
{
return $this->getTitre();
}
public function getMap(): ?string
{
return $this->map;
}
public function setMap(string $map): self
{
$this->map = $map;
return $this;
}
public function getImageBleu(): ?string
{
return $this->imageBleu;
}
public function setImageBleu(string $imageBleu): self
{
$this->imageBleu = $imageBleu;
return $this;
}
/**
* @return Collection<int, Offre>
*/
public function getOffres(): Collection
{
return $this->offres;
}
public function addOffre(Offre $offre): self
{
if (!$this->offres->contains($offre)) {
$this->offres[] = $offre;
$offre->setLieu($this);
}
return $this;
}
public function removeOffre(Offre $offre): self
{
if ($this->offres->removeElement($offre)) {
// set the owning side to null (unless already changed)
if ($offre->getLieu() === $this) {
$offre->setLieu(null);
}
}
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = $slug;
return $this;
}
}