You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
935 B
33 lines
935 B
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: chaoxinzeng
|
|
* Date: 2017/1/10
|
|
* Time: 下午3:21
|
|
*/
|
|
|
|
namespace common\libs;
|
|
|
|
use yii\helpers\Html;
|
|
use yii\widgets\LinkPager;
|
|
|
|
class MyLinkPager extends LinkPager
|
|
{
|
|
protected function renderPageButton($label, $page, $class, $disabled, $active)
|
|
{
|
|
$options = ['class' => empty($class) ? $this->pageCssClass : $class];
|
|
if ($active) {
|
|
Html::addCssClass($options, $this->activePageCssClass);
|
|
return Html::tag('li', Html::tag('span', $label), $options);
|
|
}
|
|
if ($disabled) {
|
|
Html::addCssClass($options, $this->disabledPageCssClass);
|
|
|
|
return Html::tag('li', Html::tag('span', $label), $options);
|
|
}
|
|
$linkOptions = $this->linkOptions;
|
|
$linkOptions['data-page'] = $page;
|
|
|
|
return Html::tag('li', Html::a($label, $this->pagination->createUrl($page), $linkOptions), $options);
|
|
}
|
|
} |