members = new ArrayCollection(); $this->wishes = 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|Member[] */ public function getMembers(): Collection { return $this->members; } public function addMember(Member $member): self { if (!$this->members->contains($member)) { $this->members[] = $member; $member->setGroup($this); } return $this; } public function removeMember(Member $member): self { if ($this->members->contains($member)) { $this->members->removeElement($member); // set the owning side to null (unless already changed) if ($member->getGroup() === $this) { $member->setGroup(null); } } return $this; } /** * @return Collection|Wish[] */ public function getWishes(): Collection { return $this->wishes; } public function addWish(Wish $wish): self { if (!$this->wishes->contains($wish)) { $this->wishes[] = $wish; $wish->setTarget($this); } return $this; } public function removeWish(Wish $wish): self { if ($this->wishes->contains($wish)) { $this->wishes->removeElement($wish); // set the owning side to null (unless already changed) if ($wish->getTarget() === $this) { $wish->setTarget(null); } } return $this; } }