public function deleteShippingAction(Request $request, NewsletterShipping $newsletterShipping)
    {
        $em = $this->getDoctrine()->getManager();
        $em->remove($newsletterShipping);
        $em->flush();

        $this->get('session')->getFlashBag()->add('success', 'newsletter.shipping.deleted');
        
        if($request->query->get('redirect')!=''){
            return  $this->redirect($request->query->get('redirect'));
        }
        
        return $this->redirect($this->generateUrl('coreextra_newsletter_shipping'));
    }
public function deleteShippingAction(Request $request, NewsletterShipping $newsletterShipping)
    {
        $em = $this->getDoctrine()->getManager();
        $em->remove($newsletterShipping);
        $em->flush();

        $this->get('session')->getFlashBag()->add('success', 'newsletter.shipping.deleted');
        
        if($request->query->get('redirect')!=''){
            return  $this->redirect($request->query->get('redirect'));
        }
        
        return $this->redirect($this->generateUrl('coreextra_newsletter_shipping'));
    }
public function deleteShippingAction ( Request $ request , NewsletterShipping $ newsletterShipping ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ em -> remove ( $ newsletterShipping ) ; $ em -> flush ( ) ; $ this -> get ( 'session' ) -> getFlashBag ( ) -> add ( 'success' , 'newsletter.shipping.deleted' ) ; if ( $ request -> query -> get ( 'redirect' ) != '' ) { return $ this -> redirect ( $ request -> query -> get ( 'redirect' ) ) ; } return $ this -> redirect ( $ this -> generateUrl ( 'coreextra_newsletter_shipping' ) ) ; }
Deletes a NewsletterShipping entity.

@param Request $request The request
@param int     $id      The entity id

@throws NotFoundHttpException
@return RedirectResponse

@Route("/shipping/{id}/delete")
Deletes a NewsletterShipping entity .