public function crudShow(Request $request, $id)
    {
        try{

          $entity = $this->throwEntityNotFoundException($this->getRepository()->find($id));
          $form = $this->createDeleteForm($id)->createView();
          
          return $this->commonsResponseVars(compact('entity','form'));
        }catch(\Exception $e){
           return $this->failure($e);
        }
    }
public function crudShow(Request $request, $id)
    {
        try{

          $entity = $this->throwEntityNotFoundException($this->getRepository()->find($id));
          $form = $this->createDeleteForm($id)->createView();
          
          return $this->commonsResponseVars(compact('entity','form'));
        }catch(\Exception $e){
           return $this->failure($e);
        }
    }
public function crudShow ( Request $ request , $ id ) { try { $ entity = $ this -> throwEntityNotFoundException ( $ this -> getRepository ( ) -> find ( $ id ) ) ; $ form = $ this -> createDeleteForm ( $ id ) -> createView ( ) ; return $ this -> commonsResponseVars ( compact ( 'entity' , 'form' ) ) ; } catch ( \ Exception $ e ) { return $ this -> failure ( $ e ) ; } }
Finds and displays an entity.

@param \Symfony\Component\HttpFoundation\Request $request
@param type $id
@return type
Finds and displays an entity .