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];
    }