<?phpnamespace App\Entity;use App\Repository\FinanceursRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=FinanceursRepository::class) */class Financeurs{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=100) */ private $libelle; /** * @ORM\OneToMany(targetEntity=Dossier::class, mappedBy="financeur") */ private $dossiers; /** * @ORM\OneToMany(targetEntity=Contact::class, mappedBy="financeurs") */ private $contacts; /** * @ORM\OneToMany(targetEntity=Dispositif::class, mappedBy="financeur", orphanRemoval=true) */ private $dispositifs; public function __construct() { $this->operations = new ArrayCollection(); $this->dossiers = new ArrayCollection(); $this->contacts = new ArrayCollection(); $this->dispositifs = new ArrayCollection(); } public function __toString() { return (string) $this->getLibelle(); } 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<int, Dossier> */ public function getDossiers(): Collection { return $this->dossiers; } public function addDossier(Dossier $dossier): self { if (!$this->dossiers->contains($dossier)) { $this->dossiers[] = $dossier; $dossier->setFinanceur($this); } return $this; } public function removeDossier(Dossier $dossier): self { if ($this->dossiers->removeElement($dossier)) { // set the owning side to null (unless already changed) if ($dossier->getFinanceur() === $this) { $dossier->setFinanceur(null); } } return $this; } /** * @return Collection<int, Contact> */ public function getContacts(): Collection { return $this->contacts; } public function addContact(Contact $contact): self { if (!$this->contacts->contains($contact)) { $this->contacts[] = $contact; $contact->setFinanceurs($this); } return $this; } public function removeContact(Contact $contact): self { if ($this->contacts->removeElement($contact)) { // set the owning side to null (unless already changed) if ($contact->getFinanceurs() === $this) { $contact->setFinanceurs(null); } } return $this; } /** * @return Collection<int, Dispositif> */ public function getDispositifs(): Collection { return $this->dispositifs; } public function addDispositif(Dispositif $dispositif): self { if (!$this->dispositifs->contains($dispositif)) { $this->dispositifs[] = $dispositif; $dispositif->setFinanceur($this); } return $this; } public function removeDispositif(Dispositif $dispositif): self { if ($this->dispositifs->removeElement($dispositif)) { // set the owning side to null (unless already changed) if ($dispositif->getFinanceur() === $this) { $dispositif->setFinanceur(null); } } return $this; }}