original_string: 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'));
      }
code: 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'));
      }
code_tokens: 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' ) ) ; }
docstring: Deletes a NewsletterShipping entity.
  
  @param Request $request The request
  @param int     $id      The entity id
  
  @throws NotFoundHttpException
  @return RedirectResponse
  
  @Route("/shipping/{id}/delete")
docstring_tokens: Deletes a NewsletterShipping entity .