public function editAction($iso_code)
    {
        $em = $this->getDoctrine()->getManager();

        $entity = $em->getRepository('OrkestroCountryBundle:Country')->findOneBy(array(
                'isoCode' => $iso_code,
            ));

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

        $editForm = $this->createEditForm($entity);
        $deleteForm = $this->createDeleteForm($iso_code);

        return array(
            'entity'      => $entity,
            'edit_form'   => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        );
    }
public function editAction($iso_code)
    {
        $em = $this->getDoctrine()->getManager();

        $entity = $em->getRepository('OrkestroCountryBundle:Country')->findOneBy(array(
                'isoCode' => $iso_code,
            ));

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

        $editForm = $this->createEditForm($entity);
        $deleteForm = $this->createDeleteForm($iso_code);

        return array(
            'entity'      => $entity,
            'edit_form'   => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        );
    }
public function editAction ( $ iso_code ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ entity = $ em -> getRepository ( 'OrkestroCountryBundle:Country' ) -> findOneBy ( array ( 'isoCode' => $ iso_code , ) ) ; if ( ! $ entity ) { throw $ this -> createNotFoundException ( 'Unable to find Country entity.' ) ; } $ editForm = $ this -> createEditForm ( $ entity ) ; $ deleteForm = $ this -> createDeleteForm ( $ iso_code ) ; return array ( 'entity' => $ entity , 'edit_form' => $ editForm -> createView ( ) , 'delete_form' => $ deleteForm -> createView ( ) , ) ; }
Displays a form to edit an existing Country entity.

@Route("/{iso_code}/edit", name="orkestro_backend_country_edit")
@Method("GET")
@Template()
Displays a form to edit an existing Country entity .