protected function GenerateResponse() { try { $this->response = ProveedoresController::ListaClasificacion(isset($_GET['activo']) ? $_GET['activo'] : null, isset($_GET['orden']) ? $_GET['orden'] : null); } catch (Exception $e) { //Logger::error($e); throw new ApiException($this->error_dispatcher->invalidDatabaseOperation($e->getMessage())); } }
<?php define("BYPASS_INSTANCE_CHECK", false); require_once "../../../server/bootstrap.php"; $page = new GerenciaComponentPage(); $page->addComponent(new TitleComponent("Clasificaciones de proveedor")); $page->addComponent(new MessageComponent("Lista de clasificaciones de proveedor")); $tabla = new TableComponent(array("nombre" => "Nombre", "descripcion" => "Descripcion", "activa" => "Activa"), ProveedoresController::ListaClasificacion()); $tabla->addColRender("activa", "funcion_activa"); $tabla->addOnClick("id_clasificacion_proveedor", "(function(a){ window.location = 'proveedores.clasificacion.ver.php?cid=' + a; })"); $page->addComponent($tabla); $page->render();