public function DiagnosticCheckBase::getRequirementsArray in Purge 8.3
Generates a individual Drupal-like requirements array.
Return value
array An associative array with the following elements:
- title: The name of this check.
- value: The current value (e.g., version, time, level, etc), will not be set if not applicable.
- description: The description of the check.
- severity_status: severity string: 'info', 'ok', 'warning' or 'error'.
- severity: The check's result/severity level, one of:
- REQUIREMENT_INFO: For info only.
- REQUIREMENT_OK: The requirement is satisfied.
- REQUIREMENT_WARNING: The requirement failed with a warning.
- REQUIREMENT_ERROR: The requirement failed with an error.
Overrides DiagnosticCheckInterface::getRequirementsArray
File
- src/
Plugin/ Purge/ DiagnosticCheck/ DiagnosticCheckBase.php, line 152
Class
- DiagnosticCheckBase
- Describes a diagnostic check that tests a specific purging requirement.
Namespace
Drupal\purge\Plugin\Purge\DiagnosticCheckCode
public function getRequirementsArray() {
$this
->runCheck();
return [
'title' => (string) $this
->getTitle(),
'value' => (string) $this
->getValue(),
'description' => (string) $this
->getRecommendation(),
'severity_status' => strtolower($this
->getSeverityString()),
'severity' => $this
->getRequirementsSeverity(),
];
}