public function SettingsForm::submitForm in Minify JS 8
Same name and namespace in other branches
- 8.2 src/Form/SettingsForm.php \Drupal\minifyjs\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 FormInterface::submitForm
File
- src/
Form/ SettingsForm.php, line 56
Class
- SettingsForm
- Settings form for the module.
Namespace
Drupal\minifyjs\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
\Drupal::service('config.factory')
->getEditable('minifyjs.config')
->set('exclusion_list', $form_state
->getValue('exclusion_list'))
->set('disable_admin', $form_state
->getValue('disable_admin'))
->save();
// Clear the cache
\Drupal::cache()
->delete(MINIFYJS_CACHE_CID);
}