tadcka/paginator-bundle
Composer 安装命令:
composer require tadcka/paginator-bundle
包简介
Manager pagination on Symfony2
README 文档
README
Paginator bundle.
Installation
Step 1: Download TadckaPaginatorBundle using composer
Add TadckaPaginatorBundle in your composer.json:
{ "require": { "tadcka/paginator-bundle": "dev-master" } }
Now tell composer to download the bundle by running the command:
$ php composer.phar update tadcka/paginator-bundle
Step 2: Enable the bundle
Enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Tadcka\PaginatorBundle\TadckaPaginatorBundle(), ); }
How use?
Step 3: How use?
Create pagination object:
<?php $pagination = new \Tadcka\Component\Paginator\Pagination($totalItems, $currentPage, $itemsPerPage);
Render html:
<?php $paginationHtml = $this->container->get('tadcka_paginator.manager')->getPaginatorHtml($pagination);
Step 4: Configuration
tadcka_paginator: max_near_pages: 3 template_class: pagination: test pagination_links: test_links pagination_link: test_link
统计信息
- 总下载量: 260
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-01-26