You are here

public function YamlFormUiElementTestForm::reset in YAML Form 8

File

modules/yamlform_ui/src/Form/YamlFormUiElementTestForm.php, line 169

Class

YamlFormUiElementTestForm
Provides a test form for form elements.

Namespace

Drupal\yamlform_ui\Form

Code

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