src/Paginator/Paginator.php
protected function _createPages($scrollingStyle = null)
    {
        $pageCount         = $this->count();
        $currentPageNumber = $this->getCurrentPageNumber();

        $pages = array(
            'pageCount'         => $pageCount,
            'itemCountPerPage'  => $this->getItemCountPerPage(),
            'first'             => 1,
            'current'           => $currentPageNumber,
            'last'              => $pageCount
        );

        // Previous and next
        if ($currentPageNumber - 1 > 0) {
            $pages['previous'] = $currentPageNumber - 1;
        }

        if ($currentPageNumber + 1 <= $pageCount) {
            $pages['next'] = $currentPageNumber + 1;
        }

        // Pages in range
        $scrollingStyle = $this->_loadScrollingStyle($scrollingStyle);
        $pages['pagesInRange']     = $scrollingStyle->getPages($this);
        $pages['firstPageInRange'] = min($pages['pagesInRange']);
        $pages['lastPageInRange']  = max($pages['pagesInRange']);


        return $pages;
    }
protected function _createPages($scrollingStyle = null)
    {
        $pageCount         = $this->count();
        $currentPageNumber = $this->getCurrentPageNumber();

        $pages = array(
            'pageCount'         => $pageCount,
            'itemCountPerPage'  => $this->getItemCountPerPage(),
            'first'             => 1,
            'current'           => $currentPageNumber,
            'last'              => $pageCount
        );

        // Previous and next
        if ($currentPageNumber - 1 > 0) {
            $pages['previous'] = $currentPageNumber - 1;
        }

        if ($currentPageNumber + 1 <= $pageCount) {
            $pages['next'] = $currentPageNumber + 1;
        }

        // Pages in range
        $scrollingStyle = $this->_loadScrollingStyle($scrollingStyle);
        $pages['pagesInRange']     = $scrollingStyle->getPages($this);
        $pages['firstPageInRange'] = min($pages['pagesInRange']);
        $pages['lastPageInRange']  = max($pages['pagesInRange']);


        return $pages;
    }
protected function _createPages ( $ scrollingStyle = null ) { $ pageCount = $ this -> count ( ) ; $ currentPageNumber = $ this -> getCurrentPageNumber ( ) ; $ pages = array ( 'pageCount' => $ pageCount , 'itemCountPerPage' => $ this -> getItemCountPerPage ( ) , 'first' => 1 , 'current' => $ currentPageNumber , 'last' => $ pageCount ) ; // Previous and next if ( $ currentPageNumber - 1 > 0 ) { $ pages [ 'previous' ] = $ currentPageNumber - 1 ; } if ( $ currentPageNumber + 1 <= $ pageCount ) { $ pages [ 'next' ] = $ currentPageNumber + 1 ; } // Pages in range $ scrollingStyle = $ this -> _loadScrollingStyle ( $ scrollingStyle ) ; $ pages [ 'pagesInRange' ] = $ scrollingStyle -> getPages ( $ this ) ; $ pages [ 'firstPageInRange' ] = min ( $ pages [ 'pagesInRange' ] ) ; $ pages [ 'lastPageInRange' ] = max ( $ pages [ 'pagesInRange' ] ) ; return $ pages ; }
Creates the page collection.

@param  string $scrollingStyle Scrolling style
@return array
Creates the page collection .