Esempio n. 1
0
 /**
  * If success_url param is present in request or in the provided form, redirect to this URL.
  *
  * @param BaseForm $form a base form, which may contains the success URL
  *
  * @deprecated redirectSuccess is deprecated since version 2.1 and will be removed in 2.3. You must return an instance of \Symfony\Component\HttpFoundation\RedirectResponse insteand of send a response.
  * @see generateSuccessRedirect instead of this method
  */
 protected function redirectSuccess(BaseForm $form = null)
 {
     trigger_error('redirectSuccess is deprecated since version 2.1 and will be removed in 2.3. You must return an instance of \\Symfony\\Component\\HttpFoundation\\RedirectResponse insteand of send a response. ', E_USER_DEPRECATED);
     if ($form != null) {
         $url = $form->getSuccessUrl();
     } else {
         $url = $this->getRequest()->get("success_url");
     }
     if (null !== $url) {
         $this->redirect($url);
     }
 }