If you have a rout wit url: deployment/:id/approve/:group you need to
pass the group and the id parameter so "deployment_approve?group=qa"
isn't enough. It must be something like deployment_approve?
group=qa&id=5

On 4 kvě, 18:24, Philip G <guice...@gmail.com> wrote:
> I'm trying to build a Doctrine route, using additional parameters, but
> I can't seem to get it to even pass the url generator.
>
> In my template, I have:
> <li><?php echo link_to('Approve', 'deployment/approve?group=qa',
> $deployment, array('method' => 'put')) ?></li>
>
> I'm trying to get either: deployment/id/approve/qa or deployment/id/
> approve?group=qa
>
> I started out with 'deployment_approve?group=qa' but it said route
> wasn't found. 'deployment_approve' works, but I need to pass an
> additional parameter, which I'm not finding out how.
>
> My route looks like:
> --------------------------
> deployment:
>   class: sfDoctrineRouteCollection
>   options:
>     model: Deployment
>     object_actions:
>       approve: PUT
>       deny: PUT
> ---------------------------------------------------------------------------­------------------------------------------------
>
> I'm tried creating a new deployment_approve route, but every
> modifications of it failed to get what I'm after.
>
> I would have expected 'deployment_approve?group=qa' to work with:
> ----------------------------
> deployment_approve:
>   class: sfDoctrineRoute
>   url: deployment/:id/approve/:group
>   options: { model: Deployment, type: object }
>   param:  { module: deployment, action: approve }
>   requirements: { sf_method: put, group: a-z+ }
> ---------------------------------------------------------------------------­---------
>
> But Symfony give 'The route "deployment_approve?group=qa" does not
> exist.' And when I remove '?group=qa' I get: 'The "/deployment/:id/
> approve/:group" route has some missing mandatory parameters
> (:group).' (which is expected -- I need to pass in group. I can't use
> getGroup() on Doctrine model).
>
> So, now you see what I'm after - how can I get that accomplished?
> Quite simply, I need to pass in "group" to the sfDoctrineRoute.
>
> Thansk
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to