public function addAttachment(Attachment $attachment) { $this->attachments->add($attachment); return $this; }
public function addAttachmentToArticle(Article $article, Attachment $attachment) { $article->addAttachment($attachment); $this->em->flush(); }