original_string: public function onFormSuccess(FormEvent $event)
      {
          $form = $event->getForm();
  
          $result = $this->createResult($form);
  
          if ($form->getStoreResults()) {
              $this->storeResult($form, $result);
          }
  
          if ($form->getSendMail()) {
              $this->sendMail($form, $result);
          }
  
          $successUrl = $form->getSuccessUrl();
  
          if ($successUrl != null) {
              $redirectResponse = new RedirectResponse($successUrl);
              $redirectResponse->send();
          }
      }
code: public function onFormSuccess(FormEvent $event)
      {
          $form = $event->getForm();
  
          $result = $this->createResult($form);
  
          if ($form->getStoreResults()) {
              $this->storeResult($form, $result);
          }
  
          if ($form->getSendMail()) {
              $this->sendMail($form, $result);
          }
  
          $successUrl = $form->getSuccessUrl();
  
          if ($successUrl != null) {
              $redirectResponse = new RedirectResponse($successUrl);
              $redirectResponse->send();
          }
      }
code_tokens: public function onFormSuccess ( FormEvent $ event ) { $ form = $ event -> getForm ( ) ; $ result = $ this -> createResult ( $ form ) ; if ( $ form -> getStoreResults ( ) ) { $ this -> storeResult ( $ form , $ result ) ; } if ( $ form -> getSendMail ( ) ) { $ this -> sendMail ( $ form , $ result ) ; } $ successUrl = $ form -> getSuccessUrl ( ) ; if ( $ successUrl != null ) { $ redirectResponse = new RedirectResponse ( $ successUrl ) ; $ redirectResponse -> send ( ) ; } }
docstring: Default handling for the form success event. This includes storage of
  the result, sending a confirmation mail and redirecting to the success
  URL, while respecting the form settings.
  
  @param FormEvent $event
docstring_tokens: Default handling for the form success event . This includes storage of the result sending a confirmation mail and redirecting to the success URL while respecting the form settings .