DatatableBundle icon indicating copy to clipboard operation
DatatableBundle copied to clipboard

Route parameters on setMultiple

Open xmon opened this issue 8 years ago • 1 comments

Hi,

I can not pass parameters to the route on function setMultiple.

I'm trying:

//...
->setMultiple(
      array(
            'delete' => array(
                  'title' => 'Delete',
                  'route' => [
                        'my_route' => [
                              'id' => 1
                        ]
                  ] 
            )
      )
)
//...

But I get:

An exception has been thrown during the rendering of a template ("Notice: Array to string conversion") in WaldoDatatableBundle:Snippet:multipleRaw.js.twig at line 2.`

Could you give me an example of how to do it?

thanks a lot

xmon avatar Dec 05 '16 10:12 xmon

Hi, See this repo https://github.com/waldo2188/datatable-sandbox, there is an example in the DefaultController. With this repo, you will have a fully functional example.

waldo2188 avatar Dec 08 '16 15:12 waldo2188