public function makelink()
    {
        /*
         * If link set directly that forces using it rather than build
         */
        if ($this->link) {
            return $this->link;
        }

        $pageid = static::makeParameterId($this->for);
        $parameters = $this->app['request']->query->all();
        if (array_key_exists($pageid, $parameters)) {
            unset($parameters[$pageid]);
        } else {
            unset($parameters['page']);
        }

        $parameters[$pageid] = '';
        $link = '?' . http_build_query($parameters);

        return $link;
    }
public function makelink()
    {
        /*
         * If link set directly that forces using it rather than build
         */
        if ($this->link) {
            return $this->link;
        }

        $pageid = static::makeParameterId($this->for);
        $parameters = $this->app['request']->query->all();
        if (array_key_exists($pageid, $parameters)) {
            unset($parameters[$pageid]);
        } else {
            unset($parameters['page']);
        }

        $parameters[$pageid] = '';
        $link = '?' . http_build_query($parameters);

        return $link;
    }
public function makelink ( ) { /*
         * If link set directly that forces using it rather than build
         */ if ( $ this -> link ) { return $ this -> link ; } $ pageid = static :: makeParameterId ( $ this -> for ) ; $ parameters = $ this -> app [ 'request' ] -> query -> all ( ) ; if ( array_key_exists ( $ pageid , $ parameters ) ) { unset ( $ parameters [ $ pageid ] ) ; } else { unset ( $ parameters [ 'page' ] ) ; } $ parameters [ $ pageid ] = '' ; $ link = '?' . http_build_query ( $ parameters ) ; return $ link ; }
Used for calling from template to build up right paginated URL link.

@return string
Used for calling from template to build up right paginated URL link .