builders:
list:
batch_actions:
delete: ~ # Pre coded action
myCustomAction:
label: Do custom
confirm: Please confirm you want to do that
In your ListController
add method :
<?php
protected function doBatchMyCustomAction(array $ids)
{
if (2 == (1+1)) {
$this->get('session')->setFlash('success', 'Hourri') );
return;
}
$this->get('session')->setFlash('error', 'Cruel world!') );
}
After the execution of your method doBatchMyCustomAction
the controller will be redirected to the list.
Found a typo ? Something is wrong in this documentation ? Just fork and edit it !