Datatables jquery plugin packaged as a Symfony bundle

Installs: 10 648

Dependents: 1

Stars: 3

Watchers: 2

Type: symfony-bundle

3.1.0 2015-08-21 11:17 UTC


A symfony 2 bundle that provides a convenient way to include the dataTables jquery plugin in your symfony 2 apps.

This bundle includes release 1.10 of the dataTables plugin. It also includes the plugin's bootstrap-related additions.


Add the bundle to your project's composer.json:

    "require": {
        "uam/datatables-bundle": "~3.0",

Run composer install or composer update to install the bundle:

$ php composer.phar update uam/datatables-bundle

Enable the bundle in the app's kernel:

// app/AppKernel.php

public function registerBundles()
    $bundles = array(
        // ...
        new UAM\Bundle\DatatablesBundle\UAMDatatablesBundle(),

If your composer.json does not include the post-install or post-update installAssets script handler, then run the following command:

$ php app/console assets:install


$ php app/console assets:install --symlink


To learn how to use the dataTables jquery plugin itself, see the plugin's home page at

To use the bundle itself, simply include the bundle's assets in your templates like you would any other bundle. The dataTables plugin's assets are available under the web/bundles/uamdatatables directory.

# template.html.twig

{% stylesheets filter="cssrewrite"
    <link href="{{ asset_url }}" type="text/css" rel="stylesheet" media="screen" />
{% endstylesheets %}

{% javascripts
    <script src="{{ asset_url }}"></script>
{% endjavascripts %}

If you use assetic, you need to declare the UAMDatatablesBundle in your config file's assetic section.

What's included

The bundle currently includes the following assets:

  • jquery dataTables plugin release 1.10.6
  • dataTables/bootstrap integration plugin
  • dataTables/font-awesome integration plugin

The bundle also includes a DatatablesEnabledControllerTrait and associated assets to help you design pages that list DB-entities using dataTables.

How it works

The bundle's assets are managed via bower and gulp.

Adding more assets

If you need more dataTables assets than are currently included, follow this procedure:

  • Fork the bundle
  • Customize the bower configuration file (Resources/config/bower.json):
    • Add the assets you require in the overrides|datatables-plugins|main section
    • Remove assets you do not require from the overrides section
  • Run gulp from the bundle's Resources\config directory


This bundle is licensed under the MIT license.

The dataTables jquery plugin is licensed under the MIT license.


This bundle is copyright United Asian Management Limited.

The dataTables jquery plugin is copyright Allan Jardine (

All rights reserved by their respective copyright holders.