DatatableBundle
DatatableBundle copied to clipboard
Inject Parameters into Multiple Route
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 %}