src/Entity/Gestiform/Admin/Salle.php line 17
<?phpnamespace App\Entity\Gestiform\Admin;use App\Entity\AbstractEntity;use App\Entity\Gestiform\Admin\MasterListe\Masterlistelg;use App\Entity\Gestiform\Formations\Reunion\Reunion;use App\Entity\Gestiform\Formations\Session\SalleEvent;use App\Entity\Gestiform\Formations\Session\Session;use App\Repository\Gestiform\Admin\SalleRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: SalleRepository::class)]class Salle extends AbstractEntity{#[ORM\Column(type: 'string', length: 255, nullable: false)]private string $intitule;#[ORM\Column(type: 'integer', nullable: true)]private ?int $capacite = null;#[ORM\JoinColumn(nullable: true)]#[ORM\ManyToOne(targetEntity: Masterlistelg::class)]private ?Masterlistelg $niveauMateriel = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $uservituelid;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $sallevirtuelleid;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $logocouleur = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $lienvirtuel;#[ORM\Column(type: 'boolean', nullable: true)]private bool $reservee = false;#[ORM\JoinColumn(nullable: true)]#[ORM\ManyToOne(targetEntity: Site::class, inversedBy: 'salles')]private ?Site $site = null;#[ORM\Column(type: 'boolean', nullable: true)]private ?bool $virtuel = null;#[ORM\OneToMany(mappedBy: 'salle', targetEntity: Reunion::class, cascade: ['persist'])]private Collection $reunions;#[ORM\OneToMany(mappedBy: 'event', targetEntity: SalleEvent::class, cascade: ['persist', 'remove'])]private Collection $salleEvents;#[ORM\OneToMany(mappedBy: 'salleDefaut', targetEntity: Session::class)]private Collection $sessions;public function __construct(){$this->reunions = new ArrayCollection();$this->salleEvents = new ArrayCollection();$this->sessions = new ArrayCollection();}public function getIntitule(): ?string{return $this->intitule;}public function setIntitule(string $intitule): self{$this->intitule = $intitule;return $this;}/*** @return Collection<int, Session>*/public function getSessions(): Collection{return $this->sessions;}public function addSession(Session $session): self{if (!$this->sessions->contains($session)) {$this->sessions->add($session);$session->setSalleDefaut($this);}return $this;}public function removeSession(Session $session): self{if ($this->sessions->removeElement($session) && $session->getSalleDefaut() === $this) {$session->setSalleDefaut(null);}return $this;}public function getLogocouleur(): ?string{return $this->logocouleur;}public function setLogocouleur(?string $logocouleur): self{$this->logocouleur = $logocouleur;return $this;}public function getCapacite(): ?int{return $this->capacite;}public function setCapacite(?int $capacite): self{$this->capacite = $capacite;return $this;}public function getNiveauMateriel(): ?Masterlistelg{return $this->niveauMateriel;}public function setNiveauMateriel(?Masterlistelg $niveauMateriel): self{$this->niveauMateriel = $niveauMateriel;return $this;}public function getUservituelid(): ?string{return $this->uservituelid;}public function setUservituelid(?string $uservituelid): self{$this->uservituelid = $uservituelid;return $this;}public function getSallevirtuelleid(): ?string{return $this->sallevirtuelleid;}public function setSallevirtuelleid(?string $sallevirtuelleid): self{$this->sallevirtuelleid = $sallevirtuelleid;return $this;}public function getLienvirtuel(): ?string{return $this->lienvirtuel;}public function setLienvirtuel(?string $lienvirtuel): self{$this->lienvirtuel = $lienvirtuel;return $this;}public function isReservee(): ?bool{return $this->reservee;}public function setReservee(?bool $reservee): self{$this->reservee = $reservee;return $this;}public function getSite(): ?Site{return $this->site;}public function setSite(?Site $site): self{$this->site = $site;return $this;}/*** @return Collection<int, Reunion>*/public function getReunions(): Collection{return $this->reunions;}public function addReunion(Reunion $reunion): self{if (!$this->reunions->contains($reunion)) {$this->reunions->add($reunion);$reunion->setSalle($this);}return $this;}public function removeReunion(Reunion $reunion): self{// set the owning side to null (unless already changed)if ($this->reunions->removeElement($reunion) && $reunion->getSalle() === $this) {$reunion->setSalle(null);}return $this;}public function getSallesEvents(): Collection{return $this->salleEvents;}public function addSalleEvent(SalleEvent $salleEvent): self{if (!$this->salleEvents->contains($salleEvent)) {$this->salleEvents->add($salleEvent);$salleEvent->setSalle($this);}return $this;}public function removeSalleEvent(SalleEvent $salleEvent): self{// set the owning side to null (unless already changed)if ($this->salleEvents->removeElement($salleEvent) && $salleEvent->getSalle() === $this) {$salleEvent->setSalle(null);}return $this;}public function getLieu(): ?string{if (!is_null($this->getSite())) {return $this->getSite()?->getAdresse()?->getAdresse()?->getFullDesignation();}return $this->getLienvirtuel();}public function isVirtuel(): ?bool{return $this->virtuel;}public function setVirtuel(?bool $virtuel): self{$this->virtuel = $virtuel;return $this;}}