<?phpnamespace App\Entity;use App\Repository\ReseauRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=ReseauRepository::class) */class Reseau{ /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $libelle; /** * @ORM\ManyToMany(targetEntity=Modele::class, mappedBy="reseaux", cascade={"persist"}) */ private $modeles; /** * @ORM\ManyToMany(targetEntity=TypeDevice::class, mappedBy="reseaux") */ private $typeDevices; public function __construct() { $this->modeles = new ArrayCollection(); $this->typeDevices = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getLibelle(): ?string { return $this->libelle; } public function setLibelle(string $libelle): self { $this->libelle = $libelle; return $this; } /** * @return Collection|Modele[] */ public function getModeles(): Collection { return $this->modeles; } public function addModele(Modele $modele): self { if (!$this->modeles->contains($modele)) { $this->modeles[] = $modele; $modele->addReseaux($this); } return $this; } public function removeModele(Modele $modele): self { if ($this->modeles->contains($modele)) { $this->modeles->removeElement($modele); $modele->removeReseaux($this); } return $this; } /** * @return Collection|TypeDevice[] */ public function getTypeDevices(): Collection { return $this->typeDevices; } public function addTypeDevice(TypeDevice $typeDevice): self { if (!$this->typeDevices->contains($typeDevice)) { $this->typeDevices[] = $typeDevice; $typeDevice->addReseaux($this); } return $this; } public function removeTypeDevice(TypeDevice $typeDevice): self { if ($this->typeDevices->contains($typeDevice)) { $this->typeDevices->removeElement($typeDevice); $typeDevice->removeReseaux($this); } return $this; }}