Symfony:如何传递动态userId表单列表页面以编辑更新数据页面在CURD Opteration中

I am new developer for symfony. How to pass dynamic userId form list page to edit page?. Any one explain to me.

You can pass it as a parameter like this:

In the twig template, use

<a href="{{ path('name_of_edit_action', {'id' : user.id}) }}">edit user</a>

This is the link that leads to the edit page. Assuming you user object has been passed to the template as 'user'. Ofcourse 'name_of_edit_action' can be anything, as long as it matches the name of the action in the edit controller.

Then in the edit controller, you can catch the user id like this: (hypothetical route, doesn't matter, the point is the {id} part.)

/**
* @Route("user/edit/{id}", name="name_of_edit_action")
*/
public function edit(User $user)
{

//at this point you have the user object at your disposal and you can pass it to the template as usual
}