src/helpers/PaginationHelper.php
protected static function getPageRange()
    {
        $currentPage = static::$pagination->getPage();
        $pageCount = static::$pagination->getPageCount();
        $beginPage = max(0, $currentPage - (int) (static::$params['maxButtonCount'] / 2));
        if (($endPage = $beginPage + static::$params['maxButtonCount'] - 1) >= $pageCount) {
            $endPage = $pageCount - 1;
            $beginPage = max(0, $endPage - static::$params['maxButtonCount'] + 1);
        }
        return [$beginPage, $endPage];
    }
protected static function getPageRange()
    {
        $currentPage = static::$pagination->getPage();
        $pageCount = static::$pagination->getPageCount();
        $beginPage = max(0, $currentPage - (int) (static::$params['maxButtonCount'] / 2));
        if (($endPage = $beginPage + static::$params['maxButtonCount'] - 1) >= $pageCount) {
            $endPage = $pageCount - 1;
            $beginPage = max(0, $endPage - static::$params['maxButtonCount'] + 1);
        }
        return [$beginPage, $endPage];
    }
protected static function getPageRange ( ) { $ currentPage = static :: $ pagination -> getPage ( ) ; $ pageCount = static :: $ pagination -> getPageCount ( ) ; $ beginPage = max ( 0 , $ currentPage - ( int ) ( static :: $ params [ 'maxButtonCount' ] / 2 ) ) ; if ( ( $ endPage = $ beginPage + static :: $ params [ 'maxButtonCount' ] - 1 ) >= $ pageCount ) { $ endPage = $ pageCount - 1 ; $ beginPage = max ( 0 , $ endPage - static :: $ params [ 'maxButtonCount' ] + 1 ) ; } return [ $ beginPage , $ endPage ] ; }
Get a pagination range
@return array
Get a pagination range