Require this bundle with composer:
$ composer require sidus/datagrid-bundle
<?php
/**
* app/AppKernel.php
*/
class AppKernel
{
public function registerBundles()
{
$bundles = [
// ...
// Required
new Sidus\FilterBundle\SidusFilterBundle(),
// Required, obviously
new Sidus\DataGridBundle\SidusDataGridBundle(),
// ...
];
}
}
This step is strongly recommended although optional.
Enable Symfony's Translator component:
framework:
translator: { fallbacks: ['%locale%'] } # Uncomment this line
# ...
Enable the proper form template:
twig:
# ...
form_themes:
- 'bootstrap_4_layout.html.twig'
- '@SidusDataGrid/Form/bootstrap4.html.twig' # Also available in bootstrap3 flavor