Download the PHP package kgilden/pager-bundle without Composer
On this page you can find all versions of the php package kgilden/pager-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kgilden/pager-bundle
More information about kgilden/pager-bundle
Files in kgilden/pager-bundle
Package pager-bundle
Short Description Symfony KGPagerBundle
License MIT
Informations about the package pager-bundle
KGPagerBundle
KGPagerBundle integrates kgilden/pager with the Symfony framework.
NB! This package is abandoned
The bundle was merged into the underyling library instead. Please use directly kgilden/pager in your projects.
Usage
By default a single pager is defined. Access it through the kg_pager
service id.
The current page is inferred from the page
query parameter.
Of course the pager can also be injected to any service.
Installation
Install using composer:
The bundle must then be enabled in the kernel:
That's it! no extra configuration necessary. You can make sure the bundle's up and running by executing
If everything's working, it should print out the pager service.
Configuration
You may want to optinally configure the bundle to define several pagers, each with their own settings.
The pagers are registered in the service container as kg_pager.pager.%name%
with the default pager aliased to kg_pager
.
You may optionally want to have the default pager be automatically injected to your entity repositories. For this do the following:
- Have a custom repository class implement [
PagerAwareInterface
][Doctrine/PagerAwareInterface.php]; - Set the class as the default repository class and add a custom factory service in doctrine configuration:
Contributing
If you think the bundle could be improved (which I'm 100% sure it can be), simply make a pull request or write an issue. Please try to follow the PSR coding style when contributing. Thanks!
Testing
Simply run phpunit
in the root directory of the bundle to run the full
test suite.
License
This bundle is under the MIT license. See the complete license in the bundle:
Resources/meta/LICENSE