You are here

public function YamlFormTemplatesSubmissionPreviewForm::closeDialog in YAML Form 8

Close dialog.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

bool|\Drupal\Core\Ajax\AjaxResponse An AJAX response that display validation error messages.

File

modules/yamlform_templates/src/YamlFormTemplatesSubmissionPreviewForm.php, line 81

Class

YamlFormTemplatesSubmissionPreviewForm
Preview form submission form.

Namespace

Drupal\yamlform_templates

Code

public function closeDialog(array &$form, FormStateInterface $form_state) {
  $response = new AjaxResponse();
  $response
    ->addCommand(new CloseDialogCommand());
  return $response;
}