Generate Url in Symfony framework
Generate Url :: this->generateUrl():
This function can generate the url of the module as argument of the function and returns the module full url.
$this->redirect($this->generateUrl(‘sf_guard_signin’));
and
url_for(‘ProductCompound/view?edit=’ . $id );