public function indexAction()
 {
     $util = new Util();
     //$key = $request->query->get('key',0);
     $vvaList = $this->getDoctrine()->getRepository('IglesysGeneralBundle:ValorVariable')->findAll();
     $response = new JsonResponse();
     $response->setContent($util->getSerialize($vvaList));
     return $response;
 }
Example #2
0
 public function deleteAction($id)
 {
     $util = new Util();
     //$key = $request->query->get('key',0);
     $valorVariable = $this->getDoctrine()->getRepository('IglesysGeneralBundle:ValorVariable')->find($id);
     if (!$valorVariable) {
         throw $this->createNotFoundException('No se encuentra el registro solicitado.');
     }
     $response = new JsonResponse();
     $response->setContent($util->getSerialize($valorVariable));
     return $response;
 }