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

        $entity = $em->getRepository('EcommerceBundle:Contract')->find($id);

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

        $deleteForm = $this->createDeleteForm($id);

        //get agreement
        $agreement = $entity->getAgreement();
        $paypalAgreement = $this->get('checkout_manager')->getPaypalAgreement($agreement->getPaypalId());
        
        $transactions = $this->get('checkout_manager')->searchPaypalAgreementTransactions($agreement);
                
        return array(
            'entity'      => $entity,
            'delete_form' => $deleteForm->createView(),
            'transactions' => $transactions,
            'paypalAgreement' => $paypalAgreement
        );
    }
public function showAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        $entity = $em->getRepository('EcommerceBundle:Contract')->find($id);

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

        $deleteForm = $this->createDeleteForm($id);

        //get agreement
        $agreement = $entity->getAgreement();
        $paypalAgreement = $this->get('checkout_manager')->getPaypalAgreement($agreement->getPaypalId());
        
        $transactions = $this->get('checkout_manager')->searchPaypalAgreementTransactions($agreement);
                
        return array(
            'entity'      => $entity,
            'delete_form' => $deleteForm->createView(),
            'transactions' => $transactions,
            'paypalAgreement' => $paypalAgreement
        );
    }
public function showAction ( $ id ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ entity = $ em -> getRepository ( 'EcommerceBundle:Contract' ) -> find ( $ id ) ; if ( ! $ entity ) { throw $ this -> createNotFoundException ( 'Unable to find Contract entity.' ) ; } $ deleteForm = $ this -> createDeleteForm ( $ id ) ; //get agreement $ agreement = $ entity -> getAgreement ( ) ; $ paypalAgreement = $ this -> get ( 'checkout_manager' ) -> getPaypalAgreement ( $ agreement -> getPaypalId ( ) ) ; $ transactions = $ this -> get ( 'checkout_manager' ) -> searchPaypalAgreementTransactions ( $ agreement ) ; return array ( 'entity' => $ entity , 'delete_form' => $ deleteForm -> createView ( ) , 'transactions' => $ transactions , 'paypalAgreement' => $ paypalAgreement ) ; }
Finds and displays a Contract entity.

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