/** * 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); } }
/** * Add a "order by" filter. * * @param string $field * @param string $order */ public function fkAddOrderBy($field, $fkField, $order = 'ASC') { $alias = $this->tableAlias(); $this->queryBuilder->join($this->getFullFieldName($field), $alias); $this->queryBuilder->addOrderBy($this->getFullFieldName($fkField, $alias), $order); return $this; }
/** * Ordem * * @param $sCampo * @param $sOrdem */ public function orderBy($sCampo, $sOrdem) { $this->_query->addOrderBy($sCampo, $sOrdem); }