/**
  * Applies sorting on data grid.
  * @return void
  */
 protected function applySorting()
 {
     $i = 1;
     parse_str($this->order, $list);
     foreach ($list as $field => $dir) {
         $this->dataSource->orderBy($field, $dir === 'a' ? dibi::ASC : dibi::DESC);
         $list[$field] = array($dir, $i++);
     }
     return $list;
 }
Beispiel #2
0
 public function orderBy($row, $sorting = 'ASC')
 {
     return $this->dibi_data_source->orderBy($row, $sorting);
 }
Beispiel #3
0
 /**
  * Selects columns to order by.
  * @param  string|array  column name or array of column names
  * @param  string  		 sorting direction
  * @return Database  provides a fluent interface
  */
 public function orderBy($row, $sorting = 'ASC')
 {
     parent::orderBy($row, $sorting);
     $this->array = NULL;
     return $this;
 }