Exemplo n.º 1
0
                $operador_inicio = " LIKE '%";
                $operador_fin = "%'";
                break;
            case "numeric":
                $operador_inicio = $operadores[$filtro['comparison']];
                $operador_fin = "";
                break;
        }
        $where .= " AND {$filtro['field']} {$operador_inicio}{$filtro['value']}{$operador_fin} ";
    }
    //end each
}
//FIN DE FILTROS
$return = array();
$i = 0;
if ($roles = seguridad_role::search(DELETED, 'name', $where, $start, $count, OPERATOR_DISTINCT)) {
    foreach ($roles as $r) {
        $return[$i]['id'] = $r->get('role');
        $return[$i]['name'] = $r->get('name');
        $return[$i]['description'] = $r->get('description');
        $i++;
    }
}
$result = array();
$result["totalCount"] = seguridad_role::roleCount("", "", $where);
$result["topics"] = $return;
//RESULTADO
$obj_comunication = new OOB_ext_comunication();
$obj_comunication->set_data($result);
$obj_comunication->send(true, true);