yii\widgets\LinkPager::renderPageButton PHP Method

renderPageButton() protected method

You may override this method to customize the generation of page buttons.
protected renderPageButton ( string $label, integer $page, string $class, boolean $disabled, boolean $active ) : string
$label string the text label for the button
$page integer the page number
$class string the CSS class for the page button.
$disabled boolean whether this page button is disabled
$active boolean whether this page button is active
return string the rendering result
    protected function renderPageButton($label, $page, $class, $disabled, $active)
    {
        $options = ['class' => empty($class) ? $this->pageCssClass : $class];
        if ($active) {
            Html::addCssClass($options, $this->activePageCssClass);
        }
        if ($disabled) {
            Html::addCssClass($options, $this->disabledPageCssClass);
            $tag = ArrayHelper::remove($this->disabledListItemSubTagOptions, 'tag', 'span');
            return Html::tag('li', Html::tag($tag, $label, $this->disabledListItemSubTagOptions), $options);
        }
        $linkOptions = $this->linkOptions;
        $linkOptions['data-page'] = $page;
        return Html::tag('li', Html::a($label, $this->pagination->createUrl($page), $linkOptions), $options);
    }