Swat/SwatTableViewOrderableColumn.php
private function getLink()
    {
        // unset GET vars that we want to ignore
        $vars = $_GET;

        foreach ($vars as $name => $value) {
            if (in_array($name, $this->unset_get_vars)) {
                unset($vars[$name]);
            }
        }

        $key_orderby = $this->getLinkPrefix() . 'orderby';
        $key_orderbydir = $this->getLinkPrefix() . 'orderbydir';

        unset($vars[$key_orderby]);
        unset($vars[$key_orderbydir]);

        $next_dir = $this->getNextDirection();

        if ($next_dir != $this->default_direction) {
            $vars[$key_orderby] = $this->id;
            $vars[$key_orderbydir] = $this->getDirectionAsString(
                $next_dir,
                false
            );
        }

        // build the new link
        $link = $this->link . '?';
        $first = true;

        foreach ($vars as $name => $value) {
            if ($first) {
                $first = false;
            } else {
                $link .= '&amp;';
            }

            $link .= $name . '=' . $value;
        }

        return $link;
    }
private function getLink()
    {
        // unset GET vars that we want to ignore
        $vars = $_GET;

        foreach ($vars as $name => $value) {
            if (in_array($name, $this->unset_get_vars)) {
                unset($vars[$name]);
            }
        }

        $key_orderby = $this->getLinkPrefix() . 'orderby';
        $key_orderbydir = $this->getLinkPrefix() . 'orderbydir';

        unset($vars[$key_orderby]);
        unset($vars[$key_orderbydir]);

        $next_dir = $this->getNextDirection();

        if ($next_dir != $this->default_direction) {
            $vars[$key_orderby] = $this->id;
            $vars[$key_orderbydir] = $this->getDirectionAsString(
                $next_dir,
                false
            );
        }

        // build the new link
        $link = $this->link . '?';
        $first = true;

        foreach ($vars as $name => $value) {
            if ($first) {
                $first = false;
            } else {
                $link .= '&amp;';
            }

            $link .= $name . '=' . $value;
        }

        return $link;
    }
private function getLink ( ) { // unset GET vars that we want to ignore $ vars = $ _GET ; foreach ( $ vars as $ name => $ value ) { if ( in_array ( $ name , $ this -> unset_get_vars ) ) { unset ( $ vars [ $ name ] ) ; } } $ key_orderby = $ this -> getLinkPrefix ( ) . 'orderby' ; $ key_orderbydir = $ this -> getLinkPrefix ( ) . 'orderbydir' ; unset ( $ vars [ $ key_orderby ] ) ; unset ( $ vars [ $ key_orderbydir ] ) ; $ next_dir = $ this -> getNextDirection ( ) ; if ( $ next_dir != $ this -> default_direction ) { $ vars [ $ key_orderby ] = $ this -> id ; $ vars [ $ key_orderbydir ] = $ this -> getDirectionAsString ( $ next_dir , false ) ; } // build the new link $ link = $ this -> link . '?' ; $ first = true ; foreach ( $ vars as $ name => $ value ) { if ( $ first ) { $ first = false ; } else { $ link .= '&amp;' ; } $ link .= $ name . '=' . $ value ; } return $ link ; }
Gets the link for this column's header

This method builds the link by appending special GET variables and
unsetting other ones.

@return string the link for this column's header.
Gets the link for this column s header