APY / APYDataGridBundle

Symfony Datagrid Bundle
MIT License
492 stars 344 forks source link

When creating a RowAction, the route parameter name should be dynamic. #1043

Closed glennthehuman closed 4 years ago

glennthehuman commented 4 years ago

Route is: @Route("/{userId}", name="admin_user_show")

Action is: $myRowAction = new RowAction('Show', 'admin_user_show', false, '_self', array('class' => 'show'));

This results in an error because APY always expects that the route parameter name is 'id'. Ideally, it should have the option to be customizable. So, in my case, it can be 'userId'.

glennthehuman commented 4 years ago

Nevermind. I had to dig through the documentation: https://github.com/APY/APYDataGridBundle/blob/cc423d753c725842f2683a426776aeba1706343f/Resources/doc/grid_configuration/add_row_action.md