You are here

public function DownloadCountSettingsForm::submitForm in Open Social 8.9

Same name and namespace in other branches
  1. 8 modules/custom/download_count/src/Form/DownloadCountSettingsForm.php \Drupal\download_count\Form\DownloadCountSettingsForm::submitForm()
  2. 8.2 modules/custom/download_count/src/Form/DownloadCountSettingsForm.php \Drupal\download_count\Form\DownloadCountSettingsForm::submitForm()
  3. 8.3 modules/custom/download_count/src/Form/DownloadCountSettingsForm.php \Drupal\download_count\Form\DownloadCountSettingsForm::submitForm()
  4. 8.4 modules/custom/download_count/src/Form/DownloadCountSettingsForm.php \Drupal\download_count\Form\DownloadCountSettingsForm::submitForm()
  5. 8.5 modules/custom/download_count/src/Form/DownloadCountSettingsForm.php \Drupal\download_count\Form\DownloadCountSettingsForm::submitForm()
  6. 8.6 modules/custom/download_count/src/Form/DownloadCountSettingsForm.php \Drupal\download_count\Form\DownloadCountSettingsForm::submitForm()
  7. 8.7 modules/custom/download_count/src/Form/DownloadCountSettingsForm.php \Drupal\download_count\Form\DownloadCountSettingsForm::submitForm()
  8. 8.8 modules/custom/download_count/src/Form/DownloadCountSettingsForm.php \Drupal\download_count\Form\DownloadCountSettingsForm::submitForm()
  9. 10.3.x modules/custom/download_count/src/Form/DownloadCountSettingsForm.php \Drupal\download_count\Form\DownloadCountSettingsForm::submitForm()
  10. 10.0.x modules/custom/download_count/src/Form/DownloadCountSettingsForm.php \Drupal\download_count\Form\DownloadCountSettingsForm::submitForm()
  11. 10.1.x modules/custom/download_count/src/Form/DownloadCountSettingsForm.php \Drupal\download_count\Form\DownloadCountSettingsForm::submitForm()
  12. 10.2.x modules/custom/download_count/src/Form/DownloadCountSettingsForm.php \Drupal\download_count\Form\DownloadCountSettingsForm::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/custom/download_count/src/Form/DownloadCountSettingsForm.php, line 71

Class

DownloadCountSettingsForm
Configure download count settings.

Namespace

Drupal\download_count\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('download_count.settings');
  $config
    ->set('download_count_flood_window', $form_state
    ->getValue('download_count_flood_window'))
    ->set('download_count_flood_limit', $form_state
    ->getValue('download_count_flood_limit'))
    ->set('download_count_excluded_file_extensions', $form_state
    ->getValue('download_count_excluded_file_extensions'))
    ->save();
  parent::submitForm($form, $form_state);
}