You are here

public function SettingsForm::submitForm in Advanced CSS/JS Aggregation 8.4

Same name in this branch
  1. 8.4 src/Form/SettingsForm.php \Drupal\advagg\Form\SettingsForm::submitForm()
  2. 8.4 advagg_ext_minify/src/Form/SettingsForm.php \Drupal\advagg_ext_minify\Form\SettingsForm::submitForm()
  3. 8.4 advagg_old_ie_compatibility/src/Form/SettingsForm.php \Drupal\advagg_old_ie_compatibility\Form\SettingsForm::submitForm()
  4. 8.4 advagg_mod/src/Form/SettingsForm.php \Drupal\advagg_mod\Form\SettingsForm::submitForm()
  5. 8.4 advagg_css_minify/src/Form/SettingsForm.php \Drupal\advagg_css_minify\Form\SettingsForm::submitForm()
  6. 8.4 advagg_js_minify/src/Form/SettingsForm.php \Drupal\advagg_js_minify\Form\SettingsForm::submitForm()
  7. 8.4 advagg_cdn/src/Form/SettingsForm.php \Drupal\advagg_cdn\Form\SettingsForm::submitForm()
  8. 8.4 advagg_bundler/src/Form/SettingsForm.php \Drupal\advagg_bundler\Form\SettingsForm::submitForm()
Same name and namespace in other branches
  1. 8.2 advagg_ext_minify/src/Form/SettingsForm.php \Drupal\advagg_ext_minify\Form\SettingsForm::submitForm()
  2. 8.3 advagg_ext_minify/src/Form/SettingsForm.php \Drupal\advagg_ext_minify\Form\SettingsForm::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

advagg_ext_minify/src/Form/SettingsForm.php, line 128

Class

SettingsForm
Configure advagg_ext_minify settings for this site.

Namespace

Drupal\advagg_ext_minify\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('advagg_ext_minify.settings')
    ->set('js_cmd', $form_state
    ->getValue('js_cmd'))
    ->set('js_enabled', $form_state
    ->getValue('js_enabled'))
    ->set('css_cmd', $form_state
    ->getValue('css_cmd'))
    ->set('css_enabled', $form_state
    ->getValue('css_enabled'))
    ->save();
  parent::submitForm($form, $form_state);

  // Clear relevant caches.
  Cache::invalidateTags([
    'library_info',
  ]);
}