public function delete() { $obj = new funcion(); $p = $obj->delete($_GET['id']); if ($p[0]) { header('Location: index.php?controller=funcion'); } else { $data = array(); $view = new View(); $data['msg'] = $p[1]; $data['url'] = 'index.php?controller=funcion'; $view->setData($data); $view->setTemplate('../view/_Error_App.php'); $view->setLayout('../template/Layout.php'); $view->render(); } }
public function alta_funcion_inAction() { if ($this->VerificoPerfil()) { $request = $this->getRequest(); $descripcion = $request->request->get('descripcion'); $funcion = new funcion(); $funcion->setDescripcion($descripcion); $em = $this->getDoctrine()->getManager(); $em->persist($funcion); $em->flush(); return $this->render('tutoriasBundle:Default:alta_funcion.html.twig'); } else { return $this->loginAction(); } }