function ClearCacheForm::buildForm
Same name in other branches
- 11.x core/modules/system/src/Form/ClearCacheForm.php \Drupal\system\Form\ClearCacheForm::buildForm()
Overrides FormInterface::buildForm
File
-
core/
modules/ system/ src/ Form/ ClearCacheForm.php, line 25
Class
- ClearCacheForm
- Clear caches for this site.
Namespace
Drupal\system\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['clear_cache'] = [
'#type' => 'details',
'#title' => $this->t('Clear cache'),
'#open' => TRUE,
];
$form['clear_cache']['clear'] = [
'#type' => 'submit',
'#value' => $this->t('Clear all caches'),
];
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.