/** * Creates a form to delete a Publication entity. * * @param Publication $publication The Publication entity * * @return \Symfony\Component\Form\Form The form */ private function createDeleteForm(Publication $publication) { return $this->createFormBuilder()->setAction($this->generateUrl('publication_delete', array('id' => $publication->getId())))->setMethod('DELETE')->getForm(); }