uuid = Uuid::v4(); $this->status = static::STATUS_NEW; $this->assignment = $application->getAssignment(); $this->teamer = $application->getTeamer(); $this->remarks = $application->getRemarks(); $this->documents = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getUuid(): string { return $this->uuid; } public function getStatus(): ?string { return $this->status; } public function setStatus(string $status): static { $this->status = $status; return $this; } public function getAssignment(): ?Assignment { return $this->assignment; } public function setAssignment(?Assignment $assignment): static { $this->assignment = $assignment; return $this; } public function getTeamer(): ?Teamer { return $this->teamer; } public function setTeamer(?Teamer $teamer): static { $this->teamer = $teamer; return $this; } public function getRemarks(): ?string { return $this->remarks; } public function setRemarks(?string $remarks): static { $this->remarks = $remarks; return $this; } /** * @return Collection */ public function getDocuments(): Collection { return $this->documents; } public function getDocumentByType(string $type): ?Upload { foreach ($this->getDocuments() as $upload) { if ($type === $upload->getType()) { return $upload; } } return null; } public function addDocument(Upload $document): static { if (!$this->documents->contains($document)) { $this->documents->add($document); $document->setDisposition($this); } return $this; } public function removeDocument(Upload $document): static { if ($this->documents->removeElement($document)) { // set the owning side to null (unless already changed) if ($document->getDisposition() === $this) { $document->setDisposition(null); } } return $this; } }