public function deleteAction($id)
    {
        $mailingList = $this->getDoctrine()->getRepository('OpiferMailingListBundle:MailingList')->find($id);

        if (!empty($mailingList)) {
            $em = $this->getDoctrine()->getManager();
            $em->remove($mailingList);
            $em->flush();
        }

        return $this->redirectToRoute('opifer_mailing_list_mailing_list_index');
    }
public function deleteAction($id)
    {
        $mailingList = $this->getDoctrine()->getRepository('OpiferMailingListBundle:MailingList')->find($id);

        if (!empty($mailingList)) {
            $em = $this->getDoctrine()->getManager();
            $em->remove($mailingList);
            $em->flush();
        }

        return $this->redirectToRoute('opifer_mailing_list_mailing_list_index');
    }
public function deleteAction ( $ id ) { $ mailingList = $ this -> getDoctrine ( ) -> getRepository ( 'OpiferMailingListBundle:MailingList' ) -> find ( $ id ) ; if ( ! empty ( $ mailingList ) ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ em -> remove ( $ mailingList ) ; $ em -> flush ( ) ; } return $ this -> redirectToRoute ( 'opifer_mailing_list_mailing_list_index' ) ; }
Delete Mailing List.

@param int $id
Delete Mailing List .