library simplerknppaginator-bundle
samson/simplerknppaginator-bundle
- Thursday, April 21, 2016
- by SamsonIT
- Repository
- 2 Watchers
- 0 Stars
- 142 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 0 % Grown
SimplerKNPPaginator
KNP Paginator Eventsubscriber to paginate stuff fast., (*1)
How it works
The class SimplerPaginationSubscriber is a listener on the 'knp_pager.items'-event.
Internally it uses the DataDogPagerBundle to count and slice the resultsets., (*2)
Usage
At the moment the SimplerPaginationSubscriber is only a service and is not connected to Symfony's event-system. This can easily be achieved by extending this bundle and writing a CompilerPass., (*3)
For now it can be used like this, e.g. in your Controller:, (*4)
$this->get('knp_paginator')->subscribe($this->get('samson_simple_knppaginator.subscriber.simpler_pagination_subscriber'));
$this->get('knp_paginator')->paginate($qb... );