soft2b / data-tables-bundle
Adds DataTables functionality to Symfony2
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.3|^7.0
- datatables/datatables: ~1.10.2
- doctrine/orm: ~2.2,>=2.2.3
- symfony/symfony: ~2.7
- twig/twig: ~1.13@dev
Requires (Dev)
- brown298/test_extension: 1.0
- phake/phake: 2.0.*@dev
- phpunit/phpunit: ~3.7
This package is not auto-updated.
Last update: 2024-11-09 20:28:21 UTC
README
This bundle adds DataTables ajax functionality to your Symfony2/Doctrine project.
Install
Add the package brown298\datatables to your composer.json
{ "require": { "brown298/data-tables-bundle": "dev-master" } }
For more information about Composer, please visit http://getcomposer.org
Configure
Add Brown298DataTablesBundle to your application kernel
// app/AppKernel.php public function registerBundles() { return array( // ... new Brown298\DataTablesBundle\Brown298DataTablesBundle(), // ... ); }
Assetic
As part of the composer requirements, both jQuery and DataTables are added to the vendor directory. You are welcome to use those files, or install your own. But both jQuery and DataTables are required to be added to your templates to use this bundle.
# config.yml assetic: assets: data_tables: inputs: - %kernel.root_dir%/../vendor/datatables/datatables/media/js/jquery.js - %kernel.root_dir%/../vendor/datatables/datatables/media/js/jquery.dataTables.js
{# Resources\views\base.html.twig #} {% javascripts '@data_tables' %} <script type="text/javascript" src="{{ asset_url }}"></script> {% endjavascripts %}
For more examples and instructions, please visit http://code.rbsolutions.us/datatables/