private function renameOrderByFields(SelectQuery $query, $namesMap = null, $originalSource = null) {
        if($namesMap == null) {
            $namesMap = $this->getColumnNames();
        }
        $orderByFields = &$query->getOrderByFields();
        if (!empty($orderByFields)) {
            foreach ($orderByFields as &$orderByField) {
                $newName = $this->getFieldNewName($orderByField->field, $namesMap, $originalSource, $query->getTable());
                if($newName != null) {
                    $orderByField->field = $newName;
                }
            }
        }
    }
private function renameOrderByFields(SelectQuery $query, $namesMap = null, $originalSource = null) {
        if($namesMap == null) {
            $namesMap = $this->getColumnNames();
        }
        $orderByFields = &$query->getOrderByFields();
        if (!empty($orderByFields)) {
            foreach ($orderByFields as &$orderByField) {
                $newName = $this->getFieldNewName($orderByField->field, $namesMap, $originalSource, $query->getTable());
                if($newName != null) {
                    $orderByField->field = $newName;
                }
            }
        }
    }
private function renameOrderByFields ( SelectQuery $ query , $ namesMap = null , $ originalSource = null ) { if ( $ namesMap == null ) { $ namesMap = $ this -> getColumnNames ( ) ; } $ orderByFields = & $ query -> getOrderByFields ( ) ; if ( ! empty ( $ orderByFields ) ) { foreach ( $ orderByFields as & $ orderByField ) { $ newName = $ this -> getFieldNewName ( $ orderByField -> field , $ namesMap , $ originalSource , $ query -> getTable ( ) ) ; if ( $ newName != null ) { $ orderByField -> field = $ newName ; } } } }
Renombra los campos involucrados en ordenamiento segun el mapa indicado
@param SelectQuery $query
@param $namesMap
@param mixed $originalSource
Renombra los campos involucrados en ordenamiento segun el mapa indicado