sjdeboer / datatable-bundle
DataTableBundle is a Symfony Bundle that lets you combine Symfony Framework and Doctrine with DataTables plug-in for jQuery.
dev-master
2017-08-20 19:49 UTC
Requires
- php: >=5.5.9
- doctrine/doctrine-bundle: ^1.4
- doctrine/orm: ^2.4.8
- symfony/symfony: ^2.8||^3.0
- twig/twig: ^1.0||^2.0
This package is not auto-updated.
Last update: 2024-04-14 01:25:46 UTC
README
DataTableBundle is a Symfony Bundle that lets you combine Symfony Framework and Doctrine with DataTables plug-in for jQuery.
Installation
Install the bundle into your Symfony project via composer:
composer require sjdeboer/datatable-bundle
Register the bundle in app/AppKernel.php:
// ... 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.
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!
Usage
Creating tables is very similar to creating forms in Symfony. So chances are you'll feel right at home.
Examples
- Simple table
- Table defined as a PHP class (best practice)