public function deleteAttachmentAction(Request $request, $number)
{
$attachmentService = $this->container->get('attachment');
$em = $this->container->get('em');
$attachment = $em->getRepository('Newscoop\\Entity\\Attachment')->findOneById($number);
if (!$attachment) {
throw new EntityNotFoundException('Result was not found.');
}
$attachmentService->remove($attachment);
}