Hi there,
i'am building a project wih symfony 2, and i'am very satisfied of it,
even if it's not released :-). The framerwork is very decoupled and
it's a pleasure to extends the base features to add my custom logics.
One of my (very specific) needs is to generate some urls with every
parameters, even the defaults, to avoid duplicate contents :
ex :
my_route:
pattern: /search-:keyword-:publisher-:author-:page
defaults: { _controller: FrontendBundle:Shop:search, keyword: all,
publisher: all, author:all, page:1}
// so :
$view['router']->generate('search', array('keyword' => 'foobar'));
// should generate :
/search-foobar-all-all-1
// default behavior is :
/search-foobar
So i started to extends the UrlGenerator, but i discovered that the
UrlGenerator::doGenerate does not receive the route options as a
parameter, so, basically, you can't customize a route generation using
options.
Maybe it's not the way i should go, or there is a performance
reason ? otherwise i have a pull request ready to be submitted, that
just add a routing option parameter in UrlGenerator::doGenerate, and
additionally, gather router.options in the service definition
(currently directly declared in the service, without the
generate_base_class_name options).
Thank you for your attention.
--
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