public function batchActionDelete(ProxyQueryInterface $query)
{
if (false === $this->admin->isGranted('DELETE')) {
throw new AccessDeniedException();
}
try {
$this->doBatchDelete($query);
$this->addFlash('sonata_flash_success', 'flash_batch_delete_success');
} catch (ModelManagerException $e) {
$this->addFlash('sonata_flash_error', 'flash_batch_delete_error');
}
return new RedirectResponse($this->admin->generateUrl('list', array('filter' => $this->admin->getFilterParameters())));
}