long399/yii2-widget-advanced-linkpager
Composer 安装命令:
composer require long399/yii2-widget-advanced-linkpager
包简介
yii2 advanced LinkPager Widget
关键字:
README 文档
README
AdvancedLinkPager widget for Yii Framework 2.0
Installation
The preferred way to install this extension is through composer. Either run
composer require --prefer-dist long399/yii2-widget-advanced-linkpager
or add
"long399/yii2-widget-advanced-linkpager": "~0.1"
to the require section of your composer.json file.
Usage
view:
echo GridView::widget([ ... 'pager' => [ 'class' => AdvancedLinkPager::class, 'options' => ['class' => 'pagination'], 'firstPageLabel' => 'начало', 'lastPageLabel' => 'конец', 'hideOnSinglePage' => false, 'template' => '{pageButtons}{pageList}{pageSize}{pageJump}', 'pageListLabel' => 'Страница', 'pageListCssClass' => 'btn btn-warning dropdown-toggle', 'pageSizeLabel' => 'Размер', 'pageSizeCssClass' => 'btn btn-primary dropdown-toggle', 'pageSizeItems' => [1, 10, 25, 50, 100], ], ... ]);
searchModel:
public function search($params) { ... $pageSize = isset($params['per-page']) ? intval($params['per-page']) : 10; $dataProvider = new ActiveDataProvider([ 'query' => $query, 'pagination' => [ 'pageSize' => $pageSize ], ]); ... }
Author
long399, e-mail: long399@mail.ru
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-10