function PerformanceController::build
Same name in other branches
- 10 core/modules/system/src/Controller/PerformanceController.php \Drupal\system\Controller\PerformanceController::build()
Displays the system performance page.
Return value
array A render array containing the cache-clear form and performance configuration form.
1 string reference to 'PerformanceController::build'
- system.routing.yml in core/
modules/ system/ system.routing.yml - core/modules/system/system.routing.yml
File
-
core/
modules/ system/ src/ Controller/ PerformanceController.php, line 21
Class
- PerformanceController
- Controller for performance admin.
Namespace
Drupal\system\ControllerCode
public function build() : array {
// Load the cache form and embed it in a details element.
$cache_clear = $this->formBuilder()
->getForm(ClearCacheForm::class);
$cache_clear['clear_cache'] = [
'#type' => 'details',
'#title' => $this->t('Clear cache'),
'#open' => TRUE,
'clear' => $cache_clear['clear'],
];
unset($cache_clear['clear']);
return [
'cache_clear' => $cache_clear,
'performance' => $this->formBuilder()
->getForm(PerformanceForm::class),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.