PHP code example of zhuravljov / yii2-pagination

1. Go to this page and download the library: Download zhuravljov/yii2-pagination library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zhuravljov / yii2-pagination example snippets



return [
    'container' => [
        'definitions' => [
            \yii\widgets\LinkPager::class => \zhuravljov\yii\pagination\LinkPager::class,
        ],
    ],
];


return [
    'container' => [
        'definitions' => [
            \yii\widgets\LinkPager::class => \zhuravljov\yii\pagination\LinkPager::class,
            \zhuravljov\yii\pagination\LinkPager::class => [
                'maxButtonCount' => 5,
            ],
            \zhuravljov\yii\pagination\LinkSizer::class => [
                'sizes' => [5, 10, 20, 50, 100],
            ],
            \yii\data\Pagination::class => [
                'defaultPageSize' => 10,
                'pageSizeLimit' => [1, 100],
            ],
        ],
    ],
];


return [
    'container' => [
        'definitions' => [
            \yii\data\Pagination::class => \zhuravljov\yii\pagination\StoredPagination::class,
        ],
    ],
];


return [
    'container' => [
        'definitions' => [
            \yii\data\Sort::class => \zhuravljov\yii\pagination\StoredSort::class,
        ],
    ],
];