public function sortingLink()
    {
        $filterlist = '';

        if ($this->getParameter('filter') != null) {
            foreach ($this->getParameter('filter') as $get => $value) {
                $filterlist .= 'filter['.$get.'][]='.$value.'&';
            }
        }
        if ($this->getParameter('sort') != null) {
            $sort = $this->getParameter('sort');
        } else {
            $sort = array();
        }
        if (!empty($sort[$this->getParameter('field')])) {
            if ($sort[$this->getParameter('field')] == 'ASC') {
                return $filterlist.'sort['.$this->getParameter('field').']=DESC';
            } else {
                return $filterlist.'sort['.$this->getParameter('field').']=ASC';
            }
        }
        return $filterlist.'sort['.$this->getParameter('field').']='.$this->getParameter('order');
    }
public function sortingLink()
    {
        $filterlist = '';

        if ($this->getParameter('filter') != null) {
            foreach ($this->getParameter('filter') as $get => $value) {
                $filterlist .= 'filter['.$get.'][]='.$value.'&';
            }
        }
        if ($this->getParameter('sort') != null) {
            $sort = $this->getParameter('sort');
        } else {
            $sort = array();
        }
        if (!empty($sort[$this->getParameter('field')])) {
            if ($sort[$this->getParameter('field')] == 'ASC') {
                return $filterlist.'sort['.$this->getParameter('field').']=DESC';
            } else {
                return $filterlist.'sort['.$this->getParameter('field').']=ASC';
            }
        }
        return $filterlist.'sort['.$this->getParameter('field').']='.$this->getParameter('order');
    }
public function sortingLink ( ) { $ filterlist = '' ; if ( $ this -> getParameter ( 'filter' ) != null ) { foreach ( $ this -> getParameter ( 'filter' ) as $ get => $ value ) { $ filterlist .= 'filter[' . $ get . '][]=' . $ value . '&' ; } } if ( $ this -> getParameter ( 'sort' ) != null ) { $ sort = $ this -> getParameter ( 'sort' ) ; } else { $ sort = array ( ) ; } if ( ! empty ( $ sort [ $ this -> getParameter ( 'field' ) ] ) ) { if ( $ sort [ $ this -> getParameter ( 'field' ) ] == 'ASC' ) { return $ filterlist . 'sort[' . $ this -> getParameter ( 'field' ) . ']=DESC' ; } else { return $ filterlist . 'sort[' . $ this -> getParameter ( 'field' ) . ']=ASC' ; } } return $ filterlist . 'sort[' . $ this -> getParameter ( 'field' ) . ']=' . $ this -> getParameter ( 'order' ) ; }
Returns a URL with sort parameters

Expected Params:
filter  string  the string to operate upon
sort  integer (optional) the starting point for our substring, default 0
field integer (optional) the length of the substring. default 1
order integer (optional) the length of the substring. default 1

@return string
Returns a URL with sort parameters