Hi all, I need to chain multiple admin generators and wonder if anyone has already done something like that.
Here is the use case: I have groups and users. Each user can be in multiple groups and have a different role in each group. An administrator of a group should be able to change the roles of a user in his group. I created an admin module for groups which can be accessed by: *http://www.domain.com/groups* I can change informations of a group with the usual: *http://www.domain.com/groups/:group_id* That was the easy part. Now I want to create a link for each group to the list of its users with a URL like: *http://www.domain.com/groups/:group_id/users* And the details (the roles) of a user in a group should be accessed by URL: *http://www.domain.com/groups/:group_id/users/:user_id* I may need a lot of these relations in my admin application so I really would like to use a generator. I started to create my own admin generator, extending the doctrine one, which handle something like this: In routing.yml, I have a variable prefix_path for my collection of users routes: * options: prefix_path: /groups/:group_id/users* In the generator.yml of users module, I have a new parameter: * param: route_params: [ group_id ]* Each parameter declared in route_params is propagated to all URLs by my generator. The value is read from the current request. The main issue with my solution is that it needs the request in the preExecute method of the generated actions, so I had to switch to symfony 1.3 to get this enhancement: http://trac.symfony-project.org/ticket/5271 Here are my questions: - Am I reinventing the wheel ? If yes please tell me where this wheel is ;o) - I would like to share this work through a plugin, should I wait the first release of Symfony 1.3 or is it already possible ? - Should I propose this enhancement as a feature for Symfony 1.3 ? Thanks, Damien --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
