function PerformanceForm::submitForm
Same name and namespace in other branches
- 8.9.x core/modules/system/src/Form/PerformanceForm.php \Drupal\system\Form\PerformanceForm::submitForm()
- 10 core/modules/system/src/Form/PerformanceForm.php \Drupal\system\Form\PerformanceForm::submitForm()
- 11.x core/modules/system/src/Form/PerformanceForm.php \Drupal\system\Form\PerformanceForm::submitForm()
Overrides ConfigFormBase::submitForm
File
-
core/
modules/ system/ src/ Form/ PerformanceForm.php, line 175
Class
- PerformanceForm
- Configure performance settings for this site.
Namespace
Drupal\system\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->cssCollectionOptimizer
->deleteAll();
$this->jsCollectionOptimizer
->deleteAll();
$this->config('system.performance')
->set('cache.page.max_age', $form_state->getValue('page_cache_maximum_age'))
->set('css.preprocess', $form_state->getValue('preprocess_css'))
->set('js.preprocess', $form_state->getValue('preprocess_js'))
->save();
parent::submitForm($form, $form_state);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.