Esempio n. 1
0
 protected function adjustOrder()
 {
     $order = 'asc';
     if (in_array(strtolower($this->request->get('order')), ['asc', 'desc'])) {
         $order = strtolower($this->request->get('order'));
     }
     $orderBy = $this->request->get('order');
     if ($orderBy && !in_array($orderBy, $this->exposedFields())) {
         $orderBy = '';
     }
     if ($order && $orderBy) {
         $this->model->order_by($orderBy, $order);
     }
 }