SladUsefulBundle provides some useful things that needed almost in every project. It's:
Form types:
-
Ajax Autocomplete form type (useful when you operate with thousands and hundred thousands records [for instance: users])
-
Dependent filtered form type (useful when you need operate dependent entities in one form (for instance: countries/regions))
-
Date range form type (allows you select date range with JS calendar and take valid DateRange object)
-
IF
-
IFNULL
-
ROUND
-
DATE_DIFF
You can use Ajax autocomplete form type as a filter type with SonataAdminBundle
"slad/useful-bundle": "1.0.x-dev"
You also should install SonataAdminBundle and all dependencies for it.
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new Slad\UsefulBundle\ShtumiUsefulBundle(),
// ...
);
}
// app/config/routing.yml
slad_useful:
resource: '@SladUsefulBundle/Resources/config/routing.xml'
twig:
...
form:
resources:
- SladUsefulBundle::fields.html.twig
Update your configuration in accordance with using SladUsefulBundle things
<script src="http://code.jquery.com/jquery-1.9.1.min.js" type="text/javascript"></script>