src/Slashworks/AppBundle/Controller/CustomerController.php
public function editAction($id)
        {

            /** @var Customer $oCustomer */
            $oCustomer = CustomerQuery::create()->findOneById($id);

            if (count($oCustomer) === 0) {
                throw $this->createNotFoundException('Unable to find Customer entity.');
            }

            $oEditForm   = $this->createEditForm($oCustomer);
            $oDeleteForm = $this->createDeleteForm($id);

            return $this->render('SlashworksAppBundle:Customer:edit.html.twig', array(
                'entity'      => $oCustomer,
                'edit_form'   => $oEditForm->createView(),
                'delete_form' => $oDeleteForm->createView(),
            ));
        }
public function editAction($id)
        {

            /** @var Customer $oCustomer */
            $oCustomer = CustomerQuery::create()->findOneById($id);

            if (count($oCustomer) === 0) {
                throw $this->createNotFoundException('Unable to find Customer entity.');
            }

            $oEditForm   = $this->createEditForm($oCustomer);
            $oDeleteForm = $this->createDeleteForm($id);

            return $this->render('SlashworksAppBundle:Customer:edit.html.twig', array(
                'entity'      => $oCustomer,
                'edit_form'   => $oEditForm->createView(),
                'delete_form' => $oDeleteForm->createView(),
            ));
        }
public function editAction ( $ id ) { /** @var Customer $oCustomer */ $ oCustomer = CustomerQuery :: create ( ) -> findOneById ( $ id ) ; if ( count ( $ oCustomer ) === 0 ) { throw $ this -> createNotFoundException ( 'Unable to find Customer entity.' ) ; } $ oEditForm = $ this -> createEditForm ( $ oCustomer ) ; $ oDeleteForm = $ this -> createDeleteForm ( $ id ) ; return $ this -> render ( 'SlashworksAppBundle:Customer:edit.html.twig' , array ( 'entity' => $ oCustomer , 'edit_form' => $ oEditForm -> createView ( ) , 'delete_form' => $ oDeleteForm -> createView ( ) , ) ) ; }
Displays a form to edit an existing Customer entity.

@param int $id

@return \Symfony\Component\HttpFoundation\Response
Displays a form to edit an existing Customer entity .