subthematic = new ArrayCollection(); } public function __toString() { return $this->name; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } /** * @return Collection|SubthematicInterface[] */ public function getSubthematic(): Collection { return $this->subthematic; } public function addSubthematic(SubthematicInterface $subthematic): self { if (!$this->subthematic->contains($subthematic)) { $this->subthematic[] = $subthematic; $subthematic->setThematic($this); } return $this; } public function removeSubthematic(SubthematicInterface $subthematic): self { if ($this->subthematic->removeElement($subthematic)) { // set the owning side to null (unless already changed) if ($subthematic->getThematic() === $this) { $subthematic->setThematic(null); } } return $this; } }