[symfony-users] genUrl with object

2010-07-14 Thread HAUSa
I can't use genUrl like this:
genUrl('advertisement_show', $Advertisement)
where $Advertisement is the object for the sfObjectRoute

The only way to do so is to call it like this:
genUrl('advertisement_show?id=' . $Advertisement-getId() . 'slug=' .
$Advertisement-getSlug())

But that, ofcourse, kills the flexibility of the routing system!
How can I do the top solution with getUrl?

-- 
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


Re: [symfony-users] genUrl with object

2010-07-14 Thread Gábor Fási
Is your route declared as sfPropelRoute/sfDoctrineRoute?

On Wed, Jul 14, 2010 at 15:23, HAUSa
jeroen_heeft_behoefte_aan_r...@hotmail.com wrote:
 I can't use genUrl like this:
 genUrl('advertisement_show', $Advertisement)
 where $Advertisement is the object for the sfObjectRoute

 The only way to do so is to call it like this:
 genUrl('advertisement_show?id=' . $Advertisement-getId() . 'slug=' .
 $Advertisement-getSlug())

 But that, ofcourse, kills the flexibility of the routing system!
 How can I do the top solution with getUrl?

 --
 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


-- 
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