/**
  * 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;
 }
Exemple #2
0
 public function orderBy($row, $sorting = 'ASC')
 {
     return $this->dibi_data_source->orderBy($row, $sorting);
 }
Exemple #3
0
 /**
  * Limits number of rows.
  * @param  int limit
  * @param  int offset
  * @return Database  provides a fluent interface
  */
 public function applyLimit($limit, $offset = NULL)
 {
     parent::applyLimit($limit, $offset);
     $this->array = NULL;
     return $this;
 }