participants = new ArrayCollection(); $this->comments = new ArrayCollection(); } public function getId (): ?int { return $this->id; } public function getTarget (): ?TargetGroup { return $this->target; } public function setTarget (?TargetGroup $target): self { $this->target = $target; return $this; } public function getOwner (): ?User { return $this->owner; } public function setOwner (?User $owner): self { $this->owner = $owner; return $this; } public function getDate (): ?DateTimeInterface { return $this->date; } public function setDate (DateTimeInterface $date): self { $this->date = $date; return $this; } public function getName (): ?string { return $this->name; } public function setName (string $name): self { $this->name = $name; return $this; } public function getDescription (): ?string { return $this->description; } public function setDescription (?string $description): self { $this->description = $description; return $this; } public function getVisible (): ?bool { return $this->visible; } public function setVisible (bool $visible): self { $this->visible = $visible; return $this; } public function getPriceEstimated (): ?string { return $this->price_estimated; } public function setPriceEstimated (?string $price_estimated): self { $this->price_estimated = $price_estimated; return $this; } public function getPriceReal (): ?string { return $this->price_real; } public function setPriceReal (?string $price_real): self { $this->price_real = $price_real; return $this; } public function getCrowdfunding (): ?bool { return $this->crowdfunding; } public function setCrowdfunding (bool $crowdfunding): self { $this->crowdfunding = $crowdfunding; return $this; } public function getFinished (): ?DateTimeInterface { return $this->finished; } public function setFinished (?DateTimeInterface $finished): self { $this->finished = $finished; return $this; } /** * @return Collection|Participant[] */ public function getParticipants (): Collection { return $this->participants; } public function addParticipant (Participant $participant): self { if (!$this->participants->contains($participant)) { $this->participants[] = $participant; $participant->setWish($this); } return $this; } public function removeParticipant (Participant $participant): self { if ($this->participants->contains($participant)) { $this->participants->removeElement($participant); // set the owning side to null (unless already changed) if ($participant->getWish() === $this) { $participant->setWish(null); } } return $this; } /** * @return Collection|Comment[] */ public function getComments (): Collection { return $this->comments; } public function addComment (Comment $comment): self { if (!$this->comments->contains($comment)) { $this->comments[] = $comment; $comment->setWish($this); } return $this; } public function removeComment (Comment $comment): self { if ($this->comments->contains($comment)) { $this->comments->removeElement($comment); // set the owning side to null (unless already changed) if ($comment->getWish() === $this) { $comment->setWish(null); } } return $this; } }