Exemple #1
0
 /**
  * Sets sorting.
  * @param array $sorting
  */
 public function sort(array $sorting)
 {
     foreach ($sorting as $key => $value) {
         $column = isset($this->sortMapping[$key]) ? $this->sortMapping[$key] : $this->qb->getRootAlias() . '.' . $key;
         $this->qb->addOrderBy($column, $value);
     }
 }