protected function getLinks($route,array $parameters = array()){
        $links = array();
        if($route != null){
            $baseParams = $_GET;
            unset($baseParams["page"]);
            $parameters = array_merge($parameters,$baseParams);
            $links['first']['href'] = $this->generateUrl($route, array_merge($parameters, array('page' => 1)));
            $links['self']['href'] = $this->generateUrl($route, array_merge($parameters, array('page' => $this->getCurrentPage())));
            $links['last']['href'] = $this->generateUrl($route, array_merge($parameters, array('page' => $this->getNbPages())));
            if($this->hasPreviousPage()){
                $links['previous']['href'] = $this->generateUrl($route, array_merge($parameters, array('page' => $this->getPreviousPage())));
            }
            if($this->hasNextPage()){
                $links['next']['href'] = $this->generateUrl($route, array_merge($parameters, array('page' => $this->getNextPage())));
            }
        }
        return $links;
    }
protected function getLinks($route,array $parameters = array()){
        $links = array();
        if($route != null){
            $baseParams = $_GET;
            unset($baseParams["page"]);
            $parameters = array_merge($parameters,$baseParams);
            $links['first']['href'] = $this->generateUrl($route, array_merge($parameters, array('page' => 1)));
            $links['self']['href'] = $this->generateUrl($route, array_merge($parameters, array('page' => $this->getCurrentPage())));
            $links['last']['href'] = $this->generateUrl($route, array_merge($parameters, array('page' => $this->getNbPages())));
            if($this->hasPreviousPage()){
                $links['previous']['href'] = $this->generateUrl($route, array_merge($parameters, array('page' => $this->getPreviousPage())));
            }
            if($this->hasNextPage()){
                $links['next']['href'] = $this->generateUrl($route, array_merge($parameters, array('page' => $this->getNextPage())));
            }
        }
        return $links;
    }
protected function getLinks ( $ route , array $ parameters = array ( ) ) { $ links = array ( ) ; if ( $ route != null ) { $ baseParams = $ _GET ; unset ( $ baseParams [ "page" ] ) ; $ parameters = array_merge ( $ parameters , $ baseParams ) ; $ links [ 'first' ] [ 'href' ] = $ this -> generateUrl ( $ route , array_merge ( $ parameters , array ( 'page' => 1 ) ) ) ; $ links [ 'self' ] [ 'href' ] = $ this -> generateUrl ( $ route , array_merge ( $ parameters , array ( 'page' => $ this -> getCurrentPage ( ) ) ) ) ; $ links [ 'last' ] [ 'href' ] = $ this -> generateUrl ( $ route , array_merge ( $ parameters , array ( 'page' => $ this -> getNbPages ( ) ) ) ) ; if ( $ this -> hasPreviousPage ( ) ) { $ links [ 'previous' ] [ 'href' ] = $ this -> generateUrl ( $ route , array_merge ( $ parameters , array ( 'page' => $ this -> getPreviousPage ( ) ) ) ) ; } if ( $ this -> hasNextPage ( ) ) { $ links [ 'next' ] [ 'href' ] = $ this -> generateUrl ( $ route , array_merge ( $ parameters , array ( 'page' => $ this -> getNextPage ( ) ) ) ) ; } } return $ links ; }
Genera los links de navegacion entre una y otra pagina
@param type $route
@param array $parameters
@return type
Genera los links de navegacion entre una y otra pagina