contributions = new ArrayCollection(); $this->statut = self::STATUT_EN_ATTENTE; } public function getId(): ?int { return $this->id; } public function getNom(): ?string { return $this->nom; } public function setNom(string $nom): static { $this->nom = $nom; return $this; } public function getCommentaire(): ?string { return $this->commentaire; } public function setCommentaire(?string $commentaire): static { $this->commentaire = $commentaire; return $this; } public function getDateLancement(): ?\DateTimeInterface { return $this->dateLancement; } public function setDateLancement(?\DateTimeInterface $dateLancement): static { $this->dateLancement = $dateLancement; return $this; } public function getDateCloture(): ?\DateTimeInterface { return $this->dateCloture; } public function setDateCloture(?\DateTimeInterface $dateCloture): static { $this->dateCloture = $dateCloture; return $this; } public function getStatut(): ?string { return $this->statut; } public function setStatut(string $statut): static { $this->statut = $statut; return $this; } /** * @return Collection */ public function getContributions(): Collection { return $this->contributions; } public function addContribution(Contribution $contribution): static { if (!$this->contributions->contains($contribution)) { $this->contributions->add($contribution); $contribution->setProjet($this); } return $this; } public function removeContribution(Contribution $contribution): static { if ($this->contributions->removeElement($contribution)) { // set the owning side to null (unless already changed) if ($contribution->getProjet() === $this) { $contribution->setProjet(null); } } return $this; } public function __toString(): string { return $this->nom ?? ''; } public static function getStatutChoices(): array { return [ 'En attente' => self::STATUT_EN_ATTENTE, 'En cours' => self::STATUT_EN_COURS, 'Terminé' => self::STATUT_TERMINE, 'Annulé' => self::STATUT_ANNULE, ]; } }