revolt = new ArrayCollection(); $this->dream = new ArrayCollection(); $this->projectBoost = new ArrayCollection(); $this->projectInspiring = new ArrayCollection(); } public function __toString() { return $this->nbParticipant . " participants"; } public function getResume() { return count($this->getRevolt()) . " révolte(s) - " . count($this->getDream()) . " rêve(s) - " . count( $this->getProjectBoost() ) . " projet(s) boosté(s) - " . count($this->getProjectInspiring()) . " projets inspirants"; } public function getNbDream(): string { return count($this->getDream()); } public function getNbRevolt(): string { return count($this->getRevolt()); } public function getNbProjectBoost(): string { return count($this->getProjectBoost()); } public function getNbProjectInspiring(): string { return count($this->getProjectInspiring()); } 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; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; } public function getNbParticipant(): ?int { return $this->nbParticipant; } public function setNbParticipant(int $nbParticipant): self { $this->nbParticipant = $nbParticipant; return $this; } /** * @return Collection|Revolt[] */ public function getRevolt(): Collection { return $this->revolt; } public function addRevolt(Revolt $revolt): self { if (!$this->revolt->contains($revolt)) { $this->revolt[] = $revolt; $revolt->setCollectifData($this); } return $this; } public function removeRevolt(Revolt $revolt): self { if ($this->revolt->removeElement($revolt)) { // set the owning side to null (unless already changed) if ($revolt->getCollectifData() === $this) { $revolt->setCollectifData(null); } } return $this; } /** * @return Collection|Dream[] */ public function getDream(): Collection { return $this->dream; } public function addDream(Dream $dream): self { if (!$this->dream->contains($dream)) { $this->dream[] = $dream; $dream->setCollectifData($this); } return $this; } public function removeDream(Dream $dream): self { if ($this->dream->removeElement($dream)) { // set the owning side to null (unless already changed) if ($dream->getCollectifData() === $this) { $dream->setCollectifData(null); } } return $this; } /** * @return Collection|ProjectBoost[] */ public function getProjectBoost(): Collection { return $this->projectBoost; } public function addProjectBoost(ProjectBoost $projectBoost): self { if (!$this->projectBoost->contains($projectBoost)) { $this->projectBoost[] = $projectBoost; $projectBoost->setCollectifData($this); } return $this; } public function removeProjectBoost(ProjectBoost $projectBoost): self { if ($this->projectBoost->removeElement($projectBoost)) { // set the owning side to null (unless already changed) if ($projectBoost->getCollectifData() === $this) { $projectBoost->setCollectifData(null); } } return $this; } /** * @return Collection|ProjectInspiring[] */ public function getProjectInspiring(): Collection { return $this->projectInspiring; } public function addProjectInspiring(ProjectInspiring $projectInspiring): self { if (!$this->projectInspiring->contains($projectInspiring)) { $this->projectInspiring[] = $projectInspiring; $projectInspiring->setCollectifData($this); } return $this; } public function removeProjectInspiring(ProjectInspiring $projectInspiring): self { if ($this->projectInspiring->removeElement($projectInspiring)) { // set the owning side to null (unless already changed) if ($projectInspiring->getCollectifData() === $this) { $projectInspiring->setCollectifData(null); } } return $this; } public function getTerritory(): ?Territory { return $this->territory; } public function setTerritory(?Territory $territory): self { $this->territory = $territory; return $this; } }