PHPackages                             rollerworks/datagrid - 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. rollerworks/datagrid

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

rollerworks/datagrid
====================

Datagrid system with a modular design and customizable

v0.11.1(9y ago)116.6k1[6 issues](https://github.com/rollerworks-graveyard/datagrid/issues)2MITPHPPHP ^7.0

Since May 17Pushed 9y agoCompare

[ Source](https://github.com/rollerworks-graveyard/datagrid)[ Packagist](https://packagist.org/packages/rollerworks/datagrid)[ RSS](/packages/rollerworks-datagrid/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (5)Versions (19)Used By (2)

RollerworksDatagrid
===================

[](#rollerworksdatagrid)

RollerworksDatagrid provides a powerful datagrid system for your PHP applications.

Displaying an objects list is one of the most common tasks in web applications and probably the easiest one. So how can this library help you?

The Datagrid system makes the styling and transforming of your data more uniform and easier to use. Secondly the system can take care of specific (styling) issues like sorting and paginating. All without duplicating code or degrading performance.

Features
--------

[](#features)

RollerworksDatagrid provides you with all features needed, including:

- An Advanced column type system for uniform data transformation and styling in your datagrids.
- Auto mapping of data to the datagrid.
- Support for any data source (PHP array or any object implementing `\Traversable`).
- (Optional, and coming soon) search/filter using [RollerworksSearch](https://github.com/rollerworks/search).
- (Optional, and coming soon) Integrated Paginating using [Pagerfanta](https://github.com/whiteoctober/Pagerfanta)

> **Note:** Passing a `Pagerfanta` object as data source *does already work*due to the `IteratorAggregate` implementation. The integration bridge however will make the rendering more uniform for datagrids.

Framework integration
---------------------

[](#framework-integration)

RollerworksDatagrid can be used with any Framework of your choice, but for the best possible experience use the provided framework integration plug-ins.

- [Symfony Bundle](https://github.com/rollerworks/datagrid-bundle)
- ZendFramework2 Plugin (coming soon)
- Silex Plugin (coming soon)

Your favorite framework not listed? No problem, see the \[Contributing Guidelines\] on how you can help!

Installation and usage
----------------------

[](#installation-and-usage)

*Please ignore the instructions below if your use a framework integration.*\[Read the Documentation for master\] for complete instructions and information.

Install the RollerworksDatagrid "core" library using \[Composer\]:

```
$ composer install rollerworks/datagrid
```

And create the `DatagridFactory` to get started:

```
use Rollerworks\Component\Datagrid\Datagrids;
use Rollerworks\Component\Datagrid\Extension\Core\Type as ColumnType;

$datagridFactory = Datagrids::createDatagridFactory();

$datagrid = $datagridFactory->createDatagridBuilder()
   ->add('id', ColumnType\NumberType::class)
   ->add('username', ColumnType\TextType::class)
   ->add('registered_on', ColumnType\DateTimeType::class)
   ->add('enabled', ColumnType\BooleanType::class, ['true_value' => 'Yes', 'false_value' => 'No'])
   ->getDatagrid('users_datagrid')
;

// Now set the data for the grid, this cannot be changed afterwards.
$datagrid->setData([
    ['id' => 1, 'username' => 'sstok', 'registered_on' => new \DateTime('2017-01-12 14:26:00 CET'), 'enabled' => true],
    ['id' => 2, 'username' => 'doctorw', 'registered_on' => new \DateTime('1980-04-12 09:26:00 CET'), 'enabled' => false],
    // etc...
]);

// Almost done, the datagrid needs to be rendered, see bellow.
```

### Rendering

[](#rendering)

The core package however doesn't provide an implementation for this, you are free to use any compatible template engine you wish.

This example uses the [TwigRendererEngine](https://github.com/rollerworks/datagrid-twig)(which needs to be installed separately).

```
use Rollerworks\Component\Datagrid\Twig\Extension\DatagridExtension;
use Rollerworks\Component\Datagrid\Twig\Renderer\TwigRenderer;
use Rollerworks\Component\Datagrid\Twig\Renderer\TwigRendererEngine;

// Provide the path to the base theme.
$loader = new \Twig_Loader_Filesystem([...]);

$environment = new \Twig_Environment($loader);
$environment->addExtension(new DatagridExtension());
$environment->addRuntimeLoader(new \Twig_FactoryRuntimeLoader([TwigRenderer::class => function () uses ($environment) {
    // The second argument are filenames of datagrid themes.
    $rendererEngine = new TwigRendererEngine($environment, ['datagrid.html.twig']);

    return new TwigRenderer($rendererEngine);
}]));

$environment->render('my_page.html.twig', ['datagrid' => $datagrid->createView()]);
```

And in the `my_page.html.twig` twig Template simple use:

```
{{ rollerworks_datagrid(datagrid) }}
```

That's it! Your datagrid is now rendered, but not only that! Whenever you use an advanced technique like search you only need this much code in your template.

Resources
---------

[](#resources)

- \[Read the Documentation for master\]
- RollerworksDatagrid is maintained under the [Semantic Versioning guidelines](http://semver.org/)

Who is behind RollerworksDatagrid?
----------------------------------

[](#who-is-behind-rollerworksdatagrid)

RollerworksDatagrid is brought to you by [Sebastiaan Stok](https://github.com/sstok).

License
-------

[](#license)

RollerworksDatagrid is released under the [MIT license](LICENSE).

The types and extensions are largely inspired on the Symfony Form Component, and contain a big amount of code from the Symfony project.

Support
-------

[](#support)

\[Join the chat\] or use the issue tracker if your question is to complex for quick support.

> **Note:** RollerworksDatagrid doesn't have a support forum at the moment, if you know a good free service let us know by opening an issue 👍

Contributing
------------

[](#contributing)

This is an open source project. If you'd like to contribute, please read the \[Contributing Guidelines\]. If you're submitting a pull request, please follow the guidelines in the \[Submitting a Patch\] section.

[Join the chat at https://gitter.im/rollerworks/datagrid](https://gitter.im/rollerworks/datagrid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\[Composer\]: \[Contributing Guidelines\]: \[Submitting a Patch\]: \[Read the Documentation for master\]: \[Join the chat\]:

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance9

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.9% 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.

###  Release Activity

Cadence

Every ~39 days

Recently: every ~98 days

Total

18

Last Release

3397d ago

PHP version history (3 changes)v0.1.0PHP &gt;=5.5.0

v0.8.0PHP ~5.5|~7.0

v0.10.0PHP ^7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/328359?v=4)[Luis Cordova](/maintainers/cordoval)[@cordoval](https://github.com/cordoval)

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

---

Top Contributors

[![sstok](https://avatars.githubusercontent.com/u/904790?v=4)](https://github.com/sstok "sstok (181 commits)")[![cordoval](https://avatars.githubusercontent.com/u/328359?v=4)](https://github.com/cordoval "cordoval (2 commits)")

---

Tags

datagriddatalistphpuicomponentdatagridtablerollerworks

### Embed Badge

![Health badge](/badges/rollerworks-datagrid/health.svg)

```
[![Health](https://phpackages.com/badges/rollerworks-datagrid/health.svg)](https://phpackages.com/packages/rollerworks-datagrid)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M736](/packages/sylius-sylius)[symfony/form

Allows to easily create, process and reuse HTML forms

2.8k162.1M3.4k](/packages/symfony-form)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)

PHPackages © 2026

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