public function editAction($id)
    {
        $instance = $this->getManager()->find($id);
        if(!$instance) {
            return new RedirectResponse($this->generateUrl('ringo_php_redmon'));
        }
        $form = $this->getForm($instance);
        return $this->render(
            $this->getTemplatePath().'edit.html.twig',
            array(
                'form' => $form->createView(),
                'id'   => $id,
                'errors' => array()
            )
        );
    }
public function editAction($id)
    {
        $instance = $this->getManager()->find($id);
        if(!$instance) {
            return new RedirectResponse($this->generateUrl('ringo_php_redmon'));
        }
        $form = $this->getForm($instance);
        return $this->render(
            $this->getTemplatePath().'edit.html.twig',
            array(
                'form' => $form->createView(),
                'id'   => $id,
                'errors' => array()
            )
        );
    }
public function editAction ( $ id ) { $ instance = $ this -> getManager ( ) -> find ( $ id ) ; if ( ! $ instance ) { return new RedirectResponse ( $ this -> generateUrl ( 'ringo_php_redmon' ) ) ; } $ form = $ this -> getForm ( $ instance ) ; return $ this -> render ( $ this -> getTemplatePath ( ) . 'edit.html.twig' , array ( 'form' => $ form -> createView ( ) , 'id' => $ id , 'errors' => array ( ) ) ) ; }
Edit instance action

@param string $id The instance ID
@return \Symfony\Component\HttpFoundation\RedirectResponse
Edit instance action