omines / datatables-bundle

DataTables bundle for Symfony
https://omines.github.io/datatables-bundle/
MIT License
255 stars 114 forks source link

Parameters for DataTableTypeInterface #143

Closed danut007ro closed 4 years ago

danut007ro commented 4 years ago

Hello,

When creating tables through DataTableFactory::createFromType() method, how can I pass some parameters to it?

I'm using a datatable as a sub-table, so it needs to be filtered by a field. In controller I get that parameter but it needs to be passed when building query.

If using DataTableFactory::create() I guess I can solve the issue, but I want to build tables from types.

Any hint? Thanks!

curry684 commented 4 years ago

It supports options?

https://github.com/omines/datatables-bundle/blob/83c73b7e562bf2e5427c6adac6b12b41127f5d98/src/DataTableFactory.php#L65