Hey Kay,
the clean way is to pass the routing class to the form.
//from inside controller
$form = new WhateverForm($defaults, array("routing" => $this ->
getRouting());
//from inside form
$routing = $this -> getOption("routing");
$url = $routing -> generate(...);
ideally, you also ensure that you actually pass a routing object like
so:
if((!$routing = $this -> getOption("routing")) || !$routing instanceof
sfRouting)
{
}
On May 24, 7:16 pm, KAy <[email protected]> wrote:
> How to make ajax urls environment aware?
> (How to call url_for() inside widget/form configure() ?)
>
> --
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> 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 [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