waldo2188 / DatatableBundle

Symfony2 Ajax Datatable Bundle to simplify the use of http://datatables.net/ (and Doctrine entity inside)
MIT License
17 stars 16 forks source link

Inject Parameters into Multiple Route #33

Open dahomz opened 5 years ago

dahomz commented 5 years ago

Is it be possible for params to be injected in setMultiple so that the route can be built using them in twig?

ExampleController.php $dt->setMultiple( array( 'delete' => array( 'title' => 'delete', 'route' => 'delete', 'params' => array('id' => $id), ), ) )

multipleRaw.js.twig {% for key,item in multiple %} <option value="{{ path(item.route), item.params }}">{{ item.title }}</option> {% endfor %}