tadcka / paginator-bundle
Manager pagination on Symfony2
Installs: 259
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.3
- symfony/framework-bundle: >=2.3
- tadcka/paginator: ~1.0
This package is not auto-updated.
Last update: 2024-12-17 03:30:20 UTC
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