samson/simplerknppaginator-bundle

There is no license information available for the latest version (1.1.0) of this package.

1.1.0 2016-04-21 13:50 UTC

This package is not auto-updated.

Last update: 2024-04-24 21:59:32 UTC


README

KNP Paginator Eventsubscriber to paginate stuff fast.

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.

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.

For now it can be used like this, e.g. in your Controller:

$this->get('knp_paginator')->subscribe($this->get('samson_simple_knppaginator.subscriber.simpler_pagination_subscriber'));
$this->get('knp_paginator')->paginate($qb... );