public function deleteTranslationAction($translationId)
    {
        $em = $this->get('doctrine.orm.entity_manager');
        $translation = $em->find('LexikMailerBundle:EmailTranslation', $translationId);

        if (!$translation) {
            throw $this->createNotFoundException(sprintf('No translation found for id "%d"', $translationId));
        }

        $em->remove($translation);
        $em->flush();

        return $this->redirect($this->generateUrl('lexik_mailer.email_edit', array('emailId' => $translation->getEmail()->getId())));
    }
public function deleteTranslationAction($translationId)
    {
        $em = $this->get('doctrine.orm.entity_manager');
        $translation = $em->find('LexikMailerBundle:EmailTranslation', $translationId);

        if (!$translation) {
            throw $this->createNotFoundException(sprintf('No translation found for id "%d"', $translationId));
        }

        $em->remove($translation);
        $em->flush();

        return $this->redirect($this->generateUrl('lexik_mailer.email_edit', array('emailId' => $translation->getEmail()->getId())));
    }
public function deleteTranslationAction ( $ translationId ) { $ em = $ this -> get ( 'doctrine.orm.entity_manager' ) ; $ translation = $ em -> find ( 'LexikMailerBundle:EmailTranslation' , $ translationId ) ; if ( ! $ translation ) { throw $ this -> createNotFoundException ( sprintf ( 'No translation found for id "%d"' , $ translationId ) ) ; } $ em -> remove ( $ translation ) ; $ em -> flush ( ) ; return $ this -> redirect ( $ this -> generateUrl ( 'lexik_mailer.email_edit' , array ( 'emailId' => $ translation -> getEmail ( ) -> getId ( ) ) ) ) ; }
Delete a translation

@param string $translationId
@throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
@return \Symfony\Component\HttpFoundation\RedirectResponse
Delete a translation