EcommerceBundle/Controller/TransactionController.php
public function showAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        /** @var Transaction $entity */
        $entity = $em->getRepository('EcommerceBundle:Transaction')->find($id);

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

        /** @var CheckoutManager $checkoutManager */
        $checkoutManager = $this->get('checkout_manager');

        $totals = $checkoutManager->calculateTotals($entity, $entity->getDelivery());

        return array(
            'entity' => $entity,
            'totals' => $totals,
        );
    }
public function showAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        /** @var Transaction $entity */
        $entity = $em->getRepository('EcommerceBundle:Transaction')->find($id);

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

        /** @var CheckoutManager $checkoutManager */
        $checkoutManager = $this->get('checkout_manager');

        $totals = $checkoutManager->calculateTotals($entity, $entity->getDelivery());

        return array(
            'entity' => $entity,
            'totals' => $totals,
        );
    }
public function showAction ( $ id ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; /** @var Transaction $entity */ $ entity = $ em -> getRepository ( 'EcommerceBundle:Transaction' ) -> find ( $ id ) ; if ( ! $ entity ) { throw $ this -> createNotFoundException ( 'Unable to find Transaction entity.' ) ; } /** @var CheckoutManager $checkoutManager */ $ checkoutManager = $ this -> get ( 'checkout_manager' ) ; $ totals = $ checkoutManager -> calculateTotals ( $ entity , $ entity -> getDelivery ( ) ) ; return array ( 'entity' => $ entity , 'totals' => $ totals , ) ; }
Finds and displays an Transaction entity.

@param int $id The entity id

@throws NotFoundHttpException
@return array

@Route("/{id}")
@Method("GET")
@Template
Finds and displays an Transaction entity .