You are here

public function WebformUiElementTestForm::reset in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_ui/src/Form/WebformUiElementTestForm.php \Drupal\webform_ui\Form\WebformUiElementTestForm::reset()

File

modules/webform_ui/src/Form/WebformUiElementTestForm.php, line 172

Class

WebformUiElementTestForm
Provides a test webform for webform elements.

Namespace

Drupal\webform_ui\Form

Code

public function reset(array &$form, FormStateInterface $form_state) {
  \Drupal::request()
    ->getSession()
    ->remove('webform_ui_test_element_' . $this->type);
  $this
    ->messenger()
    ->addStatus($this
    ->t('Webform element %type test has been reset.', [
    '%type' => $this->type,
  ]));
}