Because you can create a query/redirect by passing an object e.g.
$this->redirect(array('sf_route' => 'jobeet_edit', 'sf_subject' =>
$job));
and the url will be created automaticaly - he knows the slug, the
company_slug etc. - you haven't to create URL by hand, only specify
the route name and the object
On 26 led, 21:58, Patrick Leblanc <[email protected]> wrote:
> My question is really more semantic related rather than technical,
> since it works.
> But from the Day 6 of jobeet:
> ------
> # apps/frontend/config/routing.yml
> job_show_user:
> url: /job/:company_slug/:location_slug/:id/:position_slug
> class: sfDoctrineRoute
> options:
> model: JobeetJob
> type: object
> method_for_query: retrieveActiveJob
> param: { module: job, action: show }
> requirements:
> id: \d+
> sf_method: [GET]
> ------
>
> Why do we specify the model JobeetJob if symfony is going to check for
> retrieveActiveJob in the JobeetJobTable class?
>
> Thank you for helping me understand the conventions :)
--
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.