liyunfang/yii2-widget-linkpager

yii2 Widget for LinkPager

Maintainers

๐Ÿ‘ pgyf

Package info

github.com/pgyf/yii2-widget-linkpager

Homepage

Type:yii2-extension

pkg:composer/liyunfang/yii2-widget-linkpager

Statistics

Installs: 35โ€‰544

Dependents: 4

Suggesters: 0

Stars: 43

Open Issues: 1

1.0.2 2015-09-24 04:23 UTC

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 2811a2b7a9bd9f0ccc087d5455d282b08001614f

  • liyunfang <381296986.woop@qq.com>

extensionyii2linkpageryii2-widget-linkpager

This package is auto-updated.

Last update: 2026-06-07 19:46:00 UTC


README

LinkPager widgets for Yii Framework 2.0

Increase the pageSize of the page drop-down box ๐Ÿ‘ Effect picture 1

๐Ÿ‘ Effect picture 2

Installation

The preferred way to install this extension is through composer.

Either run

 composer require --prefer-dist liyunfang/yii2-widget-linkpager

or add

"liyunfang/yii2-widget-linkpager": "*"

to the require section of your composer.json file.

Requirements

This extension require twitter-bootstrap

Usage

Once the extension is installed, simply use it in your code by :

GridView options

 'filterSelector' => "select[name='".$dataProvider->getPagination()->pageSizeParam."'],input[name='".$dataProvider->getPagination()->pageParam."']",
 'pager' => [
 'class' => \liyunfang\pager\LinkPager::className(),
 //'template' => '{pageButtons} {customPage} {pageSize}',
 //'pageSizeList' => [10, 20, 30, 50],
 //'pageSizeMargin' => 'margin-left:5px;margin-right:5px;',
 //'pageSizeOptions' => ['class' => 'form-control','style' => 'display: inline-block;width:auto;margin-top:0px;'];
 //'customPageWidth' => 50,
 //'customPageBefore' => ' Jump to ',
 //'customPageAfter' => ' Page ',
 //'customPageMargin' => 'margin-left:5px;margin-right:5px;',
 //'customPageOptions' => ['class' => 'form-control','style' => 'display: inline-block;margin-top:0px;'];
 ],

ModelSearch

 public function search($params)
 {
 ...
 $pageSize = isset($params['per-page']) ? intval($params['per-page']) : 10;
 $dataProvider = new ActiveDataProvider([
 'query' => $query,
 'pagination' => ['pageSize' => $pageSize,],
 ]);
 

2015-09-16 ้‡ๆž„ไปฃ็ ๏ผŒๅขžๅŠ ่‡ชๅฎšไน‰่ทณ่ฝฌ้กต้ขๆ–‡ๆœฌๆก†