PHPackages                             zorustech/doctrine-datatables - 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. zorustech/doctrine-datatables

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

zorustech/doctrine-datatables
=============================

Library providing a Doctrine2 wrapper over Datatables.js

03.2k1PHP

Since Jul 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ZorusTech/doctrine-datatables)[ Packagist](https://packagist.org/packages/zorustech/doctrine-datatables)[ RSS](/packages/zorustech-doctrine-datatables/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Doctrine Datatables library [![Build Status](https://camo.githubusercontent.com/5f444cc0b9456d2958159fdbf8959881d9c4598236e9dac0916d97499b563183/68747470733a2f2f7472617669732d63692e6f72672f6e6575726f7379732d706c2f646f637472696e652d646174617461626c65732e706e67)](https://travis-ci.org/neurosys-pl/doctrine-datatables)
============================================================================================================================================================================================================================================================================================================================

[](#doctrine-datatables-library-)

Doctrine Datatables library provides a Doctrine2 server side processing for [Datatables](http://datatables.net/).

This library was created because existing libraries lack of flexibility around field types and field filtering. This library does not provide any JavaScript code generation nor datatables.js sources, you need to install and run datatables.js yourself.

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

[](#installation)

You can install this library using composer

```
composer require neurosys/doctrine-datatables

```

or add the package name to your composer.json

```
"require": {
    ...
    "neurosys/doctrine-datatables": "dev-master"
}
```

Features
--------

[](#features)

- support of doctrine query builder
- support of column search with custom column definitions (ex. number, date, composed fields)

It does not support global search (yet)

Usage
-----

[](#usage)

```
$builder = new TableBuilder($entityManager, $_GET);
$builder
    ->from('Foo\Bar\Entity\Sample', 's')
    ->add('text', 's.name')      // field name will be resolved from request (mDataProp_X)
    ->add('number', 's.price')   // field will be a number field which can be filtered by value range
    ->add('boolean', 's.active')
    ;

$response = $builder->getTable()
    ->getResponseArray('entity') // hydrate entity, defaults to array
    ;

// now you can simply return a response
// header ('Content-Type', 'application/json');
// echo json_encode($response);
```

Composed fields example:

```
$builder
    ->from('Foo\Bar\Entity\Sample', 's')
    ->join('s.user', 'u')
    ->add('text', 's.name')                          // select and filter by a name field
    ->add('text', 'u.firstName, u.lastName', 'u.id') // select firstName and lastName but filter by an id field
    ->add('date')
    ;
```

Custom query builder example:

```
$responseArray = $builder
    ->setQueryBuilder($customQueryBuilder)
    ->add('text', 's.foo', 's.bar') // select foo field but filter by a bar field
    ->getTable()
    ->getResponseArray();
```

Available field types
---------------------

[](#available-field-types)

- text
- number
- date
- boolean
- choice

Twig field rendering
--------------------

[](#twig-field-rendering)

Default renderer is PhpRenderer, this can be changed by passing another renderer as 4th argument to the TableBuilder:

```
new TableBuilder($entityManager, $_GET, null, new TwigRenderer($twigEnvironment));
```

To set field template pass template option:

```
$builder
    ->add('date', 's.createdAt', null, array(
        'template' => 'path/to/template.html.twig'
    ))
```

In template.html.twig

```
{{ value | date }}
```

Warning
-------

[](#warning)

This library is still in development, API is most likely to change.

License
-------

[](#license)

Doctrine Datatables is licensed under the MIT license.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 71.4% 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://avatars.githubusercontent.com/u/1379912?v=4)[Dan Fuhry](/maintainers/fuhry)[@fuhry](https://github.com/fuhry)

---

Top Contributors

[![bpasinski-neurosys](https://avatars.githubusercontent.com/u/12530633?v=4)](https://github.com/bpasinski-neurosys "bpasinski-neurosys (35 commits)")[![hellomedia](https://avatars.githubusercontent.com/u/868734?v=4)](https://github.com/hellomedia "hellomedia (6 commits)")[![neurosys-public](https://avatars.githubusercontent.com/u/5764675?v=4)](https://github.com/neurosys-public "neurosys-public (5 commits)")[![fuhry](https://avatars.githubusercontent.com/u/1379912?v=4)](https://github.com/fuhry "fuhry (1 commits)")[![lizuk-neurosys](https://avatars.githubusercontent.com/u/9930485?v=4)](https://github.com/lizuk-neurosys "lizuk-neurosys (1 commits)")[![mpruciak-neurosys](https://avatars.githubusercontent.com/u/20660516?v=4)](https://github.com/mpruciak-neurosys "mpruciak-neurosys (1 commits)")

### Embed Badge

![Health badge](/badges/zorustech-doctrine-datatables/health.svg)

```
[![Health](https://phpackages.com/badges/zorustech-doctrine-datatables/health.svg)](https://phpackages.com/packages/zorustech-doctrine-datatables)
```

###  Alternatives

[coyl/git

PHP library for manipulations on git repository. Based on kbjr/Git.php and it's forks

11199.7k4](/packages/coyl-git)[mehedijaman/laravel-zkteco

Connect any zkteco fingerprint attendance machine to laravel application with no effort.

454.1k](/packages/mehedijaman-laravel-zkteco)

PHPackages © 2026

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