public function retrieveData($sortField, $sortOrder, $offset = 0, $maxRows = 150) { if ($this->session->userdata(urlClassName() . '_filtro')) { foreach ($this->session->userdata(urlClassName() . '_filtro') as $campo => $valor) { $this->db->where($campo, $valor); } } $query = $this->db->order_by($sortField, $sortOrder)->get($this->table, $maxRows, $offset); return array('count' => $this->count_all($this->table), 'data' => $query); }
/** * Retorna a view do metodo */ function urlGetViewFiltros() { return urlModule() . DS . urlClassName() . DS . urlClassName() . '_filtro'; }