public function StatusController::json in Acquia Connector 8.2
Same name and namespace in other branches
- 8 src/Controller/StatusController.php \Drupal\acquia_connector\Controller\StatusController::json()
- 3.x src/Controller/StatusController.php \Drupal\acquia_connector\Controller\StatusController::json()
Return JSON site status.
Used by Acquia uptime monitoring.
1 string reference to 'StatusController::json'
File
- src/
Controller/ StatusController.php, line 36
Class
- StatusController
- Checks the current status of the Acquia Service.
Namespace
Drupal\acquia_connector\ControllerCode
public function json() {
// We don't want this page cached.
\Drupal::service('page_cache_kill_switch')
->trigger();
$performance_config = $this
->config('system.performance');
$data = [
'version' => '1.0',
'data' => [
'maintenance_mode' => (bool) $this
->state()
->get('system.maintenance_mode'),
'cache' => $performance_config
->get('cache.page.use_internal'),
'block_cache' => FALSE,
],
];
return new JsonResponse($data);
}