コード例 #1
0
 /**
  * Creates default response for form instance
  *
  * @param FormInterface $form
  *
  * @return JsonResponse
  */
 protected function createFormDefaultJsonResponse(FormInterface $form)
 {
     return $this->jsonResponse(['valid' => $form->isValid(), 'continue' => $form->isAction('continue'), 'next' => $form->isAction('next'), 'redirectTo' => $this->getRedirectToActionUrl('index'), 'error' => $form->getError()]);
 }