If you plan to distribute your bundle, does not use the FrameworkExtraBundle
and use the xml routing definition.
On 14 mars 2011, at 09:40, Nikita Korotaev wrote:
> Hi everyone,
>
> Recently I've decided to change routes from Yaml declaration to annotations
> using FrameworkExtraBundle, which is now shipped with Symfony2.
> Previously I was able to link several routes to one action:
>
> management__users:
> pattern: /management/users
> defaults: { _controller: KernelBundle:Management:users}
>
> management__users__filter:
> pattern: /management/users/{filter}/{value}
> defaults: { _controller: KernelBundle:Management:users}
>
> And action was like this:
> public function usersAction($filter = null, $value = null)
>
>
> So with annotations I need to do something like this:
> /**
> * @extra:Route("/users", name="management__users")
> * @extra:Route("/users/:filter/:value",
> name="management__users__filter")
> */
> public function usersAction($filter = null, $value = null)
>
> But of course this gives me an error. How should I implement this kind of
> scenario with annotations?
>
> Regards,
> Nikita
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> 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
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
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