interventions = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } /** * @return Collection */ public function getInterventions(): Collection { return $this->interventions; } public function addIntervention(Intervention $intervention): self { if (!$this->interventions->contains($intervention)) { $this->interventions[] = $intervention; $intervention->addSpeaker($this); } return $this; } public function removeIntervention(Intervention $intervention): self { if ($this->interventions->removeElement($intervention)) { $intervention->removeSpeaker($this); } return $this; } }