public function SettingsForm::submitForm in Advanced CSS/JS Aggregation 8.2
Same name in this branch
- 8.2 src/Form/SettingsForm.php \Drupal\advagg\Form\SettingsForm::submitForm()
- 8.2 advagg_ext_minify/src/Form/SettingsForm.php \Drupal\advagg_ext_minify\Form\SettingsForm::submitForm()
- 8.2 advagg_mod/src/Form/SettingsForm.php \Drupal\advagg_mod\Form\SettingsForm::submitForm()
- 8.2 advagg_css_minify/src/Form/SettingsForm.php \Drupal\advagg_css_minify\Form\SettingsForm::submitForm()
- 8.2 advagg_js_minify/src/Form/SettingsForm.php \Drupal\advagg_js_minify\Form\SettingsForm::submitForm()
- 8.2 advagg_cdn/src/Form/SettingsForm.php \Drupal\advagg_cdn\Form\SettingsForm::submitForm()
- 8.2 advagg_bundler/src/Form/SettingsForm.php \Drupal\advagg_bundler\Form\SettingsForm::submitForm()
Same name and namespace in other branches
- 8.4 advagg_bundler/src/Form/SettingsForm.php \Drupal\advagg_bundler\Form\SettingsForm::submitForm()
- 8.3 advagg_bundler/src/Form/SettingsForm.php \Drupal\advagg_bundler\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_bundler/
src/ Form/ SettingsForm.php, line 174
Class
- SettingsForm
- Configure advagg_bundler settings for this site.
Namespace
Drupal\advagg_bundler\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('advagg_bundler.settings')
->set('active', $form_state
->getValue('active'))
->set('max_css', $form_state
->getValue('max_css'))
->set('css_logic', $form_state
->getValue('css_logic'))
->set('max_js', $form_state
->getValue('max_js'))
->set('js_logic', $form_state
->getValue('js_logic'))
->save();
parent::submitForm($form, $form_state);
// Clear relevant caches.
$this->cssCollectionOptimizer
->deleteAll();
$this->jsCollectionOptimizer
->deleteAll();
Cache::invalidateTags([
'library_info',
'advagg_css',
'advagg_js',
]);
}