コード例 #1
0
 /**
  * Método para buscar
  */
 public function buscar($field = 'sucursal', $value = 'none', $order = 'order.id.asc', $page = 1)
 {
     $page = Filter::get($page, 'page') > 0 ? Filter::get($page, 'page') : 1;
     $field = Input::hasPost('field') ? Input::post('field') : $field;
     $value = Input::hasPost('field') ? Input::post('value') : $value;
     $value = strtoupper($value);
     $modelo = new Modelo();
     $modelos = $modelo->getAjaxModelos($field, $value, $order, $page);
     if (empty($modelos->items)) {
         DwMessage::info('No se han encontrado registros');
     }
     $this->modelos = $modelos;
     $this->order = $order;
     $this->field = $field;
     $this->value = $value;
     $this->page_title = 'Búsqueda de modelos del sistema';
 }