interventions = new ArrayCollection(); } public function __toString() { return $this->getLabel(); } public function getId(): ?int { return $this->id; } public function getLabel(): ?string { return $this->label; } public function setLabel(string $label): self { $this->label = $label; 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->addTool($this); } return $this; } public function removeIntervention(Intervention $intervention): self { if ($this->interventions->removeElement($intervention)) { $intervention->removeTool($this); } return $this; } }