public function Internal::process in Production check & Production monitor 8
Processes a single prod check plugin
Parameters
\Drupal\prod_check\Plugin\ProdCheckInterface $plugin:
Return value
array An array containing the check result. Contains the status, severity, title and success or failure messages depending on the result.
Overrides ProdCheckProcessorBase::process
1 call to Internal::process()
- Internal::requirements in src/
Plugin/ ProdCheckProcessor/ Internal.php - Fetches all the requirements for the prod check status report page.
1 method overrides Internal::process()
- Rest::process in modules/
prod_check_rest/ src/ Plugin/ ProdCheckProcessor/ Rest.php - Processes a single prod check plugin
File
- src/
Plugin/ ProdCheckProcessor/ Internal.php, line 47
Class
- Internal
- Internal processor that handles processing of all checks.
Namespace
Drupal\prod_check\Plugin\ProdCheckProcessorCode
public function process(ProdCheckInterface $plugin) {
if (!$plugin) {
return [];
}
$plugin
->setProcessor($this);
$status = $plugin
->state();
$requirement = [
'status' => $status,
'severity' => $status ? $this
->ok() : $plugin
->severity(),
'title' => $plugin
->title(),
'category' => $plugin
->category(),
];
if ($status) {
$requirement += $plugin
->successMessages();
}
else {
$requirement += $plugin
->failMessages();
}
return $requirement;
}