chiliec/yii2-pager
最新稳定版本:2.0
Composer 安装命令:
composer require chiliec/yii2-pager
包简介
Pager for Yii2
关键字:
README 文档
README
Quick previous and next links for simple pagination implementations with light markup and styles. It's great for simple sites like blogs or magazines. Based on Bootstrap Pager.
Usage
<?php echo \chiliec\pager\Pager::widget([ 'tableName' => $model->tableName(), 'currentId' => $model->id, // current primary key 'path' => 'story/view', // path for link // optional fields in most cases 'primaryKey' => 'id', // name of primary key column 'title' => 'title', // name of title column 'additionalСondition' => 'published = 1', // additional SQL-condition 'cacheTime' => 3600, // time for cache results 'navOptions' => [], 'listOptions' => ['class' => 'pager'], 'prevOptions' => ['class' => 'pull-left', 'rel' => 'prev'], 'nextOptions' => ['class' => 'pull-right', 'rel' => 'next'], ]); ?>
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist chiliec/yii2-pager "~2.0"
or add
"chiliec/yii2-pager": "~2.0"
to the require section of your composer.json file.
统计信息
- 总下载量: 216
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-01-01