jrk/easypagination-bundle
Composer 安装命令:
composer require jrk/easypagination-bundle
包简介
easypagination bundle for symfony2/3
README 文档
README
Setup
JRKEasyPaginationBundle requires the Pagerfanta api folder
- Using composer
Add jrk/easypagination-bundle as a dependency in your project's composer.json file:
{
"require": {
"jrk/easypagination-bundle": "dev-master"
}
}
Update composer
php composer update
or
php composer.phar update
- Add JRKEasyPaginationBundle to your application kernel
``` php
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new JRK\EasyPaginationBundle\JRKEasyPaginationBundle(),
);
}
Usage
- Using service
Open your controller and call the service.
<?php list($entities, $counter, $pager, $pagerHtml) = $this->get('jrk_easypagination')->paginate( $queryBuilder, // QueryBuilder array('args' => array('limit' => $limit), 'route' => self::$route_list), // Route for HTML widget $limit, // Number of items per page false, // OutOfRangeException quiet or not $page, // The page number (by default it will check for "page" attribute in the request) true // If you need the HTML widget ); ?>
统计信息
- 总下载量: 200
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-07