PHPackages                             data-dog/pager-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. data-dog/pager-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

data-dog/pager-bundle
=====================

Paginator bundle for symfony2 and doctrine orm, allows customization with filters and sorters

v0.2.14(4y ago)11103.5k↓25.6%18[3 issues](https://github.com/DATA-DOG/DataDogPagerBundle/issues)7MITPHPPHP &gt;=5.4.0CI failing

Since Jul 24Pushed 4y ago15 watchersCompare

[ Source](https://github.com/DATA-DOG/DataDogPagerBundle)[ Packagist](https://packagist.org/packages/data-dog/pager-bundle)[ Docs](http://github.com/DATA-DOG/DataDogPagerBundle)[ RSS](/packages/data-dog-pager-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (26)Used By (7)

Pager bundle
============

[](#pager-bundle)

This paginator is different in the following ways:

- it has only one general class with around 300 lines of commented code. All the rest of the source code is specific to symfony2 framework, twig helpers and templates.
- it allows to create custom pagination filters - search, select.. and modify the database query based on the specific use cases.
- it also handles sorting in the traditional way.
- it is very small and may be reused in other frameworks with the modifications needed.
- it can only paginate Doctrine2 ORM QueryBuilder. Nothing else will be supported to maintain this library small and backward compatible. For your own customizations just fork or copy the source code.
- there may be only one pagination per request, because url query parameters are constant.

Demo
----

[](#demo)

The best way to see features is to see the actual demo. Just clone the bundle and run:

```
make

```

Visit **** to see the paginated fake projects with custom filters and sorters.

The demo application source is available in **example** directory and it is a basic symfony application.

Install
-------

[](#install)

First, install it with composer:

```
composer require data-dog/pager-bundle

```

Then, add it in your **AppKernel** bundles.

Usage
-----

[](#usage)

The general usage example in your controller:

```
