PHPackages                             widmogrod/data-grid - 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. widmogrod/data-grid

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

widmogrod/data-grid
===================

DataGrid is simple library for presentation different kinds of tabular data

12361PHP

Since Nov 25Pushed 13y agoCompare

[ Source](https://github.com/widmogrod/data-grid)[ Packagist](https://packagist.org/packages/widmogrod/data-grid)[ RSS](/packages/widmogrod-data-grid/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

DataGrid [![Build Status](https://camo.githubusercontent.com/24028cfb9ef7c778b16a3957b3c16f1d1faa451d7d3477294681974fec80c859/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f7769646d6f67726f642f646174612d677269642e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/widmogrod/data-grid)
===============================================================================================================================================================================================================================================================================================================

[](#datagrid-)

Introduction
------------

[](#introduction)

DataGrid is simple library for presentation different kinds of tabular data. Is written in PHP5.3 and is still in development process.

If you wish to help me with this project or correct my english description - your help will be more than appreciated :)

Project road map
----------------

[](#project-road-map)

- Features:
    - pagination
    - ordering
    - filters
    - translations
- Documentation
- Tests

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

[](#installation)

### Composer

[](#composer)

1. `cd my/project/directory`
2. Create a `composer.json` file with following content:

    ```
    {
        "require": {
            "widmogrod/data-grid": "dev-master"
        }
    }
    ```
3. Run `php composer.phar install`

How to use
----------

[](#how-to-use)

### with Doctrine 2

[](#with-doctrine-2)

```
// select
$dql = 'SELECT q FROM Question q JOIN q.answers';
/* @var $q \Doctrine\ORM\Query */
$q = $em->createQuery($dql);

$grid = DataGrid($q);
$grid->setRenderer(new Renderer\HtmlTable());
echo $grid->render();
```

### with ArrayObject, array

[](#with-arrayobject-array)

```
$data = array(
    array('user' => 'widmogrod'),
    array('user' => 'jhone'),
    array('user' => 'jim'),
);
$grid = new DataGrid($data);
$grid->setRenderer(new Renderer\HtmlTable());
echo $grid->render();
```

### with your own adapter

[](#with-your-own-adapter)

To provide unknown adapter for new data types not supported by default in DataGrid you should use one of following setups:

```
$options = array(
    'dataTypesToAdapter' => array('Zend\Db\ResultSet\ResultSet' => 'My\DataGrid\Adapter\ResultSet'),
);
// or
$options = array(
    'dataTypesToAdapter' => array('Zend\Db\ResultSet\ResultSet' => 'ZendDbResultSet'),
    'invokableAdapters' => array('ZendDbResultSet' => 'My\DataGrid\Adapter\ResultSet')
);

// fetch result set
/** @var $resultSet \Zend\Db\ResultSet\ResultSet */
$resultSet = $this->select();

$grid = new DataGrid($resultSet, $options);
$grid->setRenderer(new Renderer\HtmlTable());
echo $grid->render();
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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/511338e7e9e4e1e5a7c99656dc2c746fe72c5680486c38504d244437c34555c0?d=identicon)[widmogrod](/maintainers/widmogrod)

---

Top Contributors

[![widmogrod](https://avatars.githubusercontent.com/u/164249?v=4)](https://github.com/widmogrod "widmogrod (9 commits)")

### Embed Badge

![Health badge](/badges/widmogrod-data-grid/health.svg)

```
[![Health](https://phpackages.com/badges/widmogrod-data-grid/health.svg)](https://phpackages.com/packages/widmogrod-data-grid)
```

PHPackages © 2026

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