QuickForm: allow params for successUrl

This commit is contained in:
Thomas Gelf 2015-10-15 17:52:02 +02:00
parent 7f9d1750c5
commit 0544be3aec
1 changed files with 7 additions and 1 deletions

View File

@ -205,8 +205,14 @@ abstract class QuickForm extends Zend_Form
) + $enum;
}
public function setSuccessUrl($url)
public function setSuccessUrl($url, $params = null)
{
if (! $url instanceof Url) {
$url = Url::fromPath($url);
}
if ($params !== null) {
$url->setParams($params);
}
$this->successUrl = $url;
return $this;
}