You are here

public function RemovalSettingsForm::submitForm in General Data Protection Regulation 8

Same name and namespace in other branches
  1. 8.2 modules/gdpr_tasks/src/Form/RemovalSettingsForm.php \Drupal\gdpr_tasks\Form\RemovalSettingsForm::submitForm()
  2. 3.0.x modules/gdpr_tasks/src/Form/RemovalSettingsForm.php \Drupal\gdpr_tasks\Form\RemovalSettingsForm::submitForm()

Form submission 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.

Overrides ConfigFormBase::submitForm

File

modules/gdpr_tasks/src/Form/RemovalSettingsForm.php, line 68

Class

RemovalSettingsForm
Settings form for GDPR Removal task.

Namespace

Drupal\gdpr_tasks\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config(self::CONFIG_KEY)
    ->set(self::EXPORT_DIRECTORY, $form_state
    ->getValue('directory'))
    ->save();
  $this
    ->messenger()
    ->addStatus('Changes saved.');
}