philiplb / CRUDlex

CRUDlex is an easy to use CRUD generator for Symfony 4 and Silex 2 which is great for auto generated admin pages
https://philiplb.de/crudlex/
MIT License
109 stars 23 forks source link

Batch operations #84

Closed jmfayard closed 7 years ago

jmfayard commented 7 years ago

Hello, in my company I implemented an ad-hoc "Batch operations" feature, and I'm thinking about backporting it to crudlex

In my case we wanted to delete all selected entries, but that could be extended for example to have a CSV export

image

What could be a good api for this?

first draft in pseudo-code

$app['crud']->addBatchOperation(new MyCrudlexBatchOperation())
class MyCrudlexBatchOperation extends BatchOperation
   fun support(EntityDefinition definition) => true or false
   fun label => "CSV Export"
   fun handle(EntityDefinition definition, List<Entity> entities) ---> do the csv export
germain-italic commented 7 years ago

@jmfayard batch select and export look awesome! Hope you can backport this to crudlex!

philiplb commented 7 years ago

Closed in favor of https://github.com/philiplb/CRUDlex/issues/70