PHPackages                             da/paginator-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. da/paginator-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

da/paginator-bundle
===================

Symfony2's helper bundle for pagination

06.1kPHP

Since Oct 6Pushed 9y ago3 watchersCompare

[ Source](https://github.com/Gnuckorg/DaPaginatorBundle)[ Packagist](https://packagist.org/packages/da/paginator-bundle)[ RSS](/packages/da-paginator-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

DaPaginatorBundle
=================

[](#dapaginatorbundle)

This Symfony2's bundle is an helper for managing paginated contents in an easy way. It is built on [Pagerfanta](https://github.com/whiteoctober/Pagerfanta).

Installation
------------

[](#installation)

Installation is a quick 2 steps process.

### Step 1: Add in composer

[](#step-1-add-in-composer)

Add the bundle in the composer.json file:

```
// composer.json

"require": {
    // ...
    "pagerfanta/pagerfanta": "dev-master",
    "da/paginator-bundle": "dev-master"
},
```

Update your vendors with composer:

```
composer update      # WIN
composer.phar update # LINUX
```

### Step 2: Declare in the kernel

[](#step-2-declare-in-the-kernel)

Declare the bundle in your kernel:

```
// app/AppKernel.php

$bundles = array(
    // ...
    new Da\PaginatorBundle\DaPaginatorBundle(),
);
```

Usage
-----

[](#usage)

### Paginated content definition

[](#paginated-content-definition)

```
/**
 * @Route("/")
 * @Template()
 */
public function testAction()
{
    $paginator = $this->container->get('da_paginator.paginator');

    $paginatedContent = $paginator->defineOffsetPaginatedContent(
        array('id' => 'Id', 'name' => 'City Name'),
        'array',
        array(array(
            array('id' => 1,  'name' => 'madrid',    'desc' => 'none'),
            array('id' => 2,  'name' => 'berlin',    'desc' => 'none'),
            array('id' => 3,  'name' => 'london',    'desc' => 'none'),
            array('id' => 4,  'name' => 'boston',    'desc' => 'none'),
            array('id' => 5,  'name' => 'chicago',   'desc' => 'none'),
            array('id' => 6,  'name' => 'new york',  'desc' => 'none'),
            array('id' => 7,  'name' => 'sidney',    'desc' => 'none'),
            array('id' => 8,  'name' => 'paris',     'desc' => 'none'),
            array('id' => 9,  'name' => 'tokyo',     'desc' => 'none'),
            array('id' => 10, 'name' => 'hong kong', 'desc' => 'none'),
            array('id' => 11, 'name' => 'pekin',     'desc' => 'none'),
            array('id' => 12, 'name' => 'bombay',    'desc' => 'none')
        )),
        'skip',
        'limit'
    );

    return array('cities' => $paginatedContent);
}
```

`defineOffsetPaginatedContent` allows you to define a paginated content. `array` means you use a data in an array form but you can use a doctrine query builder, callbacks and many others.

You can use an offset/length pattern or a page/per\_page pattern and define your own labels (here skip/limit).

### Paginated content display

[](#paginated-content-display)

```
{{ da_paginator.render(cities, 'bootstrap')|raw }}
```

`render` allows you to render a paginated content in a fast and customized way.

Documentation
-------------

[](#documentation)

You can do a lot more things like formatting the content of a column. Let's take a look at the full [documentation](https://github.com/Gnuckorg/DaPaginatorBundle/blob/master/Resources/doc/index.md) to have more explanations and see advanced features!

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cc6dff73f30c5ee1a374376f984f427f1761d3fbd42bb625e1c3e799bcee6f07?d=identicon)[Gnucki](/maintainers/Gnucki)

---

Top Contributors

[![Gnucki](https://avatars.githubusercontent.com/u/1064697?v=4)](https://github.com/Gnucki "Gnucki (26 commits)")[![Nabil-06-](https://avatars.githubusercontent.com/u/4696138?v=4)](https://github.com/Nabil-06- "Nabil-06- (1 commits)")

### Embed Badge

![Health badge](/badges/da-paginator-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/da-paginator-bundle/health.svg)](https://phpackages.com/packages/da-paginator-bundle)
```

###  Alternatives

[dachcom-digital/schema

Pimcore Schema

1075.7k](/packages/dachcom-digital-schema)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
