Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
716cf56cb2.url-de-test.ws
/
htdocs_old
/
src
/
Entity
/
//srv/data/web/vhosts/716cf56cb2.url-de-test.ws/htdocs_old/src/Entity/Facility.php
<?php namespace App\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** * @ORM\Entity(repositoryClass="App\Repository\FacilityRepository") * @UniqueEntity("value") */ class Facility { /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $value; /** * @ORM\ManyToMany(targetEntity="App\Entity\Establishment", mappedBy="facilities") */ private $establishments; public function __construct() { $this->establishments = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getValue(): ?string { return $this->value; } public function setValue(string $value): self { $this->value = $value; return $this; } public function __toString() { return $this->value; } /** * @return Collection|Establishment[] */ public function getEstablishments(): Collection { return $this->establishments; } public function addEstablishment(Establishment $establishment): self { if (!$this->establishments->contains($establishment)) { $this->establishments[] = $establishment; $establishment->addFacility($this); } return $this; } public function removeEstablishment(Establishment $establishment): self { if ($this->establishments->contains($establishment)) { $this->establishments->removeElement($establishment); $establishment->removeFacility($this); } return $this; } }