public function removeAttachmentFormArticle(Article $article, Attachment $attachment) { $article->getAttachments()->removeElement($attachment); $this->em->flush(); }