CRUDlex icon indicating copy to clipboard operation
CRUDlex copied to clipboard

Offer a checkbox on the listpage for mass manipulation

Open philiplb opened this issue 9 years ago • 1 comments

including a "select all" checkbox on top and bottom for the whole page. The first use case would be to delete the selected items.

philiplb avatar Sep 19 '16 22:09 philiplb

From https://github.com/philiplb/CRUDlex/issues/84:

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

philiplb avatar Jun 01 '17 15:06 philiplb