DataTableBundle
DataTableBundle is a Symfony Bundle that lets you combine Symfony Framework and Doctrine with DataTables plug-in for jQuery., (*1)
Installation
Install the bundle into your Symfony project via composer:, (*2)
composer require sjdeboer/datatable-bundle
, (*3)
Register the bundle in app/AppKernel.php:, (*4)
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Sjdeboer\DataTableBundle\SjdeboerDataTableBundle(),
);
// ...
}
}
Optionally, you can add the below configuration to app/config/config.yml and adjust it to your needs., (*5)
sdeboer_data_table:
# Default class added to the HTML table element
default_table_class: ''
# Default Datatables options. For available options, see: https://datatables.net/reference/option/
default_datatables_options:
searching: false
You should now be ready to start creating tables!, (*6)
Usage
Creating tables is very similar to creating forms in Symfony. So chances are you'll feel right at home., (*7)
Examples
Reference