Open dahomz opened 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), ), ) )
$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 %}
{% for key,item in multiple %}
<option value="{{ path(item.route), item.params }}">{{ item.title }}</option>
{% endfor %}
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 %}