APYDataGridBundle
APYDataGridBundle copied to clipboard
mass action not passing identifiers
Im not entirely sure if this is something Ive not done, or whether its something missing in the documentation.
When adding a massAction using a controller function, the key values are not passed through as per the documentation, its necessary to grab them out of the request manually.
$massAction = new MassAction( 'Delete', 'MyBundle:Documents:massDelete', 'Are you sure?...' );
$grid->addMassAction( $massAction );
//...
controller
public function massDeleteAction($keys, $allKeys) {
// ... do something with keys
}
This does not pass the keys through to the controller method.
public function massDeleteAction(Request $request) {
$data = $request->request->all();
// .. do something with the data
}
This is the only way I can get access to the form data. What am I doing wrong? While its no issue to do it this way, its not mentioned in the documentation that I have to, hence Im thinking Im wrong.
Symfony 2.7.6 thanks.