public function DiagnosticsService::isSystemShowingSmoke in Purge 8.3
Reports if any of the diagnostic checks report a SEVERITY_WARNING severity.
This method provides a - boolean evaluable - way to determine if a check reported a DiagnosticCheckInterface::SEVERITY_WARNING. If SEVERITY_WARNING was reported, cache invalidation can continue but it is important that the site administrator gets notified.
Return value
false|\Drupal\purge\Plugin\Purge\DiagnosticCheck\DiagnosticCheckInterface The SEVERITY_WARNING reporting check, or FALSE when everything was fine.
Overrides DiagnosticsServiceInterface::isSystemShowingSmoke
File
- src/
Plugin/ Purge/ DiagnosticCheck/ DiagnosticsService.php, line 228
Class
- DiagnosticsService
- Provides a service that interacts with diagnostic checks.
Namespace
Drupal\purge\Plugin\Purge\DiagnosticCheckCode
public function isSystemShowingSmoke() {
$this
->initializePluginInstances();
foreach ($this as $check) {
if ($check
->getSeverity() === DiagnosticCheckInterface::SEVERITY_WARNING) {
return $check;
}
}
return FALSE;
}