event = $event; $this->event_team_id = $team_id; $this->name = $name; $this->heroes = new ArrayCollection(); } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } /** * * @return Collection|EventHero[] */ public function getHeroes(): Collection { return $this->heroes; } public function addHero(EventHero $hero): self { if (! $this->heroes->contains($hero)) { $this->heroes[] = $hero; $hero->setTeam($this); } return $this; } public function removeHero(EventHero $hero): self { if ($this->heroes->contains($hero)) { $this->heroes->removeElement($hero); // set the owning side to null (unless already changed) if ($hero->getTeam() === $this) { $hero->setTeam(null); } } return $this; } public function getEvent(): ?Event { return $this->event; } public function setEvent(?Event $event): self { $this->event = $event; return $this; } public function getEventTeamId(): ?int { return $this->event_team_id; } }