<?phpnamespace App\Entity;use App\Repository\LitsChambreRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=LitsChambreRepository::class) */class LitsChambre{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $type; /** * @ORM\Column(type="integer") */ private $place; /** * @ORM\Column(type="string", length=255) */ private $slug; /** * @ORM\ManyToMany(targetEntity=Chambre::class, mappedBy="typeDeLits") */ private $chambres; public function __construct() { $this->chambres = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getType(): ?string { return $this->type; } public function setType(string $type): self { $this->type = $type; return $this; } public function getPlace(): ?int { return $this->place; } public function setPlace(int $place): self { $this->place = $place; return $this; } public function getSlug(): ?string { return $this->slug; } public function setSlug(string $slug): self { $this->slug = $slug; return $this; } /** * @return Collection|Chambre[] */ public function getChambres(): Collection { return $this->chambres; } public function addChambre(Chambre $chambre): self { if (!$this->chambres->contains($chambre)) { $this->chambres[] = $chambre; $chambre->addTypeDeLit($this); } return $this; } public function removeChambre(Chambre $chambre): self { if ($this->chambres->removeElement($chambre)) { $chambre->removeTypeDeLit($this); } return $this; }}