public function deleteAction($id)
    {
        $instance = $this->getManager()->find($id);
        if($instance) {
            $this->getManager()->delete($instance);
            $this->get('session')->getFlashBag()->add('success', 'Instance Redis has been deleted successfully');
        }else {
            $this->get('session')->getFlashBag()->add('error', 'This instance does not exist');
        }
        
        return new RedirectResponse($this->generateUrl('ringo_php_redmon'));
    }
public function deleteAction($id)
    {
        $instance = $this->getManager()->find($id);
        if($instance) {
            $this->getManager()->delete($instance);
            $this->get('session')->getFlashBag()->add('success', 'Instance Redis has been deleted successfully');
        }else {
            $this->get('session')->getFlashBag()->add('error', 'This instance does not exist');
        }
        
        return new RedirectResponse($this->generateUrl('ringo_php_redmon'));
    }
public function deleteAction ( $ id ) { $ instance = $ this -> getManager ( ) -> find ( $ id ) ; if ( $ instance ) { $ this -> getManager ( ) -> delete ( $ instance ) ; $ this -> get ( 'session' ) -> getFlashBag ( ) -> add ( 'success' , 'Instance Redis has been deleted successfully' ) ; } else { $ this -> get ( 'session' ) -> getFlashBag ( ) -> add ( 'error' , 'This instance does not exist' ) ; } return new RedirectResponse ( $ this -> generateUrl ( 'ringo_php_redmon' ) ) ; }
Delete instance action

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