protected function createPageLink($url, $page, $currentPage, $idTemplate = null, $classes = array(), $currentPageClass = '') {
        //If this is the current page add the current page class to the classes array
        if ($page == $currentPage) {
            $classes[] = $currentPageClass;
            $disabled = true;
        } else {
            $disabled = false;
        }

        //Create the page url
        $pageUrl = str_replace('!page!', (string)$page, $url);

        //If an id template is present, create the id
        if ($idTemplate) {
            $id = str_replace('!page!', (string)$page, $idTemplate);
        } else {
            $id = null;
        }

        //instance and return the new page link object
        return new PageLink((string)$page, $pageUrl, $id, $classes, $disabled);
    }
protected function createPageLink($url, $page, $currentPage, $idTemplate = null, $classes = array(), $currentPageClass = '') {
        //If this is the current page add the current page class to the classes array
        if ($page == $currentPage) {
            $classes[] = $currentPageClass;
            $disabled = true;
        } else {
            $disabled = false;
        }

        //Create the page url
        $pageUrl = str_replace('!page!', (string)$page, $url);

        //If an id template is present, create the id
        if ($idTemplate) {
            $id = str_replace('!page!', (string)$page, $idTemplate);
        } else {
            $id = null;
        }

        //instance and return the new page link object
        return new PageLink((string)$page, $pageUrl, $id, $classes, $disabled);
    }
protected function createPageLink ( $ url , $ page , $ currentPage , $ idTemplate = null , $ classes = array ( ) , $ currentPageClass = '' ) { //If this is the current page add the current page class to the classes array if ( $ page == $ currentPage ) { $ classes [ ] = $ currentPageClass ; $ disabled = true ; } else { $ disabled = false ; } //Create the page url $ pageUrl = str_replace ( '!page!' , ( string ) $ page , $ url ) ; //If an id template is present, create the id if ( $ idTemplate ) { $ id = str_replace ( '!page!' , ( string ) $ page , $ idTemplate ) ; } else { $ id = null ; } //instance and return the new page link object return new PageLink ( ( string ) $ page , $ pageUrl , $ id , $ classes , $ disabled ) ; }
Helper function for the generate Page links that combines the parameters and creates a new page link

@param  string $url              Url Template from generate page links
@param  int    $page             The page number to create a page link for
@param  int    $currentPage      The current page being viewed
@param  string $idTemplate       Optional id template from the generate page links
@param  array $classes           Optional array of classes
@param  string $currentPageClass Optional currentPageClass

@return PageLink                 New page link object
Helper function for the generate Page links that combines the parameters and creates a new page link