You are here

function purge_requirements in Purge 8.3

Same name and namespace in other branches
  1. 6 purge.install \purge_requirements()
  2. 7 purge.install \purge_requirements()

Implements hook_requirements().

File

./purge.install, line 11
Installation file for the purge module.

Code

function purge_requirements($phase) {
  if ($phase !== 'runtime') {
    return [];
  }
  $checks = \Drupal::service('purge.diagnostics');
  return $checks
    ->toRequirementsArray($checks
    ->filterWarningAndErrors(), TRUE);
}