function ClearCacheForm::submitForm
Same name and namespace in other branches
- 11.x core/modules/system/src/Form/ClearCacheForm.php \Drupal\system\Form\ClearCacheForm::submitForm()
Clears the caches.
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
-
core/
modules/ system/ src/ Form/ ClearCacheForm.php, line 44
Class
- ClearCacheForm
- Clear caches for this site.
Namespace
Drupal\system\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
drupal_flush_all_caches();
$this->messenger()
->addStatus($this->t('Caches cleared.'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.