EcommerceBundle/Controller/TransactionController.php
public function deleteAction(Request $request, $id)
    {

        $em = $this->getDoctrine()->getManager();
        $entity = $em->getRepository('EcommerceBundle:Transaction')->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find Transaction entity.');
        }

        $em->remove($entity);
        $em->flush();
        
         $this->get('session')->getFlashBag()->add('info', 'transaction.deleted');
         
        return array();
    }
public function deleteAction(Request $request, $id)
    {

        $em = $this->getDoctrine()->getManager();
        $entity = $em->getRepository('EcommerceBundle:Transaction')->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find Transaction entity.');
        }

        $em->remove($entity);
        $em->flush();
        
         $this->get('session')->getFlashBag()->add('info', 'transaction.deleted');
         
        return array();
    }
public function deleteAction ( Request $ request , $ id ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ entity = $ em -> getRepository ( 'EcommerceBundle:Transaction' ) -> find ( $ id ) ; if ( ! $ entity ) { throw $ this -> createNotFoundException ( 'Unable to find Transaction entity.' ) ; } $ em -> remove ( $ entity ) ; $ em -> flush ( ) ; $ this -> get ( 'session' ) -> getFlashBag ( ) -> add ( 'info' , 'transaction.deleted' ) ; return array ( ) ; }
Deletes a Transaction entity.

@param int $id The order id

@throws NotFoundHttpException
@return array

@Route("/{id}/delete")
@Method("GET")
@Template("EcommerceBundle:Transaction:index.html.twig")
Deletes a Transaction entity .