public function eliminarAction() { $id = (int) $this->params()->fromRoute('id', 0); $id2 = $this->params()->fromRoute('id2', ""); if ($id > 0) { //eliminar //$this->dbAdapter=$this->getServiceLocator()->get('Zend\Db\Adapter'); $sid = new Container('base'); $db_name = $sid->offsetGet('dbNombre'); $id_db = $sid->offsetGet('id_db'); $this->dbAdapter = $this->getServiceLocator()->get($db_name); $reclamo = new ReclamoTable($this->dbAdapter); $reclamo->eliminarReclamo($id); } if ($id2 == "c") { return $this->forward()->dispatch('Conserje\\Controller\\Reclamo', array('action' => 'consultar')); } else { return $this->forward()->dispatch('Conserje\\Controller\\Reclamo', array('action' => 'respuesta')); } }
public function eliminarAction() { $id = (int) $this->params()->fromRoute('id', 0); $id2 = $this->params()->fromRoute('id2', ""); if ($id > 0) { //eliminar $this->dbAdapter = $this->getServiceLocator()->get('Zend\\Db\\Adapter'); $reclamo = new ReclamoTable($this->dbAdapter); $reclamo->eliminarReclamo($id); } if ($id2 == "c") { return $this->forward()->dispatch('Conserje\\Controller\\Reclamo', array('action' => 'consultar')); } else { return $this->forward()->dispatch('Conserje\\Controller\\Reclamo', array('action' => 'respuesta')); } }