You are here

public function YamlFormResultsCustomForm::delete in YAML Form 8

Form delete customized columns handler.

Parameters

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

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

File

src/Form/YamlFormResultsCustomForm.php, line 309

Class

YamlFormResultsCustomForm
Form for form results custom(ize) form.

Namespace

Drupal\yamlform\Form

Code

public function delete(array &$form, FormStateInterface $form_state) {
  $this->yamlform
    ->deleteState($this
    ->getStateKey('columns'));
  $this->yamlform
    ->deleteState($this
    ->getStateKey('sort'));
  $this->yamlform
    ->deleteState($this
    ->getStateKey('direction'));
  $this->yamlform
    ->deleteState($this
    ->getStateKey('limit'));
  $this->yamlform
    ->deleteState($this
    ->getStateKey('default'));
  $this->yamlform
    ->deleteState($this
    ->getStateKey('format'));
  drupal_set_message($this
    ->t('The customized table has been reset.'));
}