Hello,

I have a route like this :

SurveyResults:
  url: /spaces/:space_id/admin/survey/:id/results.:sf_format
  class: sfDoctrineRoute
  options: { model: Survey, type: object, column: id }
  params: { module: backSurvey, action: results }
  requirements:
    sf_method: [get]
    sf_format: (?:html|csv)

Before using sf_format, I made my urls in template with this code :

url_for('SurveyResults', $survey)

But now, with the parameter sf_route, I can't use this code, because
sf_format is not defined for the routing.
For me, using this code is not ... beautiful :

url_for('@SurveyResults?sf_format=csv&id='.$survey-
>getId().'&space_id='.$survey->getSpaceId())

I tested to create an accessor getSfFormat (which returns html|csv
string), but it doesn't work, because it's a variable sufixed by sf...

Has a solution to pass only the object (or the object and sf_format)
on the url_for ?

I really want to fix this by a code like :

url_for('SurveyResults', array(' ??? ' => $survey, 'sf_format' =>
'csv')

-- 
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 developers" 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-devs?hl=en

Reply via email to