mailAttachments = new ArrayCollection(); } public function getId(): ?string { return $this->id; } public function getMailing(): ?Mailing { return $this->mailing; } public function setMailing(?Mailing $mailing): self { $this->mailing = $mailing; return $this; } public function getSubject(): ?string { return $this->subject; } public function setSubject(string $subject): self { $this->subject = $subject; return $this; } public function getDate(): ?\DateTimeInterface { return $this->date; } public function setDate(\DateTimeInterface $date): self { $this->date = $date; return $this; } public function getHtmlContent(): ?string { return $this->htmlContent; } public function setHtmlContent(?string $htmlContent): self { $this->htmlContent = $htmlContent; return $this; } public function getTextContent(): ?string { return $this->textContent; } public function setTextContent(?string $textContent): self { $this->textContent = $textContent; return $this; } /** * @return Collection|MailAttachment[] */ public function getMailAttachments(): Collection { return $this->mailAttachments; } public function addMailAttachment(MailAttachment $mailAttachment): self { if (!$this->mailAttachments->contains($mailAttachment)) { $this->mailAttachments[] = $mailAttachment; $mailAttachment->setMail($this); } return $this; } public function removeMailAttachment(MailAttachment $mailAttachment): self { if ($this->mailAttachments->removeElement($mailAttachment)) { // set the owning side to null (unless already changed) if ($mailAttachment->getMail() === $this) { $mailAttachment->setMail(null); } } return $this; } }