function hook_acquia_purge_diagnostics in Acquia Purge 7
Register pre-flight diagnostic check functions.
Each function referred to in these hook implementations, are called before Acquia Purge starts operating or when "drush ap-diagnosis" is called. These checks should be as lightweight as possible to prevent performance problems.
Each function, is called with these parameters:
- string $t: Name of the t() function to call.
- AcquiaPurgeService $service: The Acquia Purge service.
Each function, should return an associative array with these elements:
- title: The name of the requirement.
- value: The current value (e.g., version, time, level, etc).
- description: The description of the requirement/status.
- severity:
- ACQUIA_PURGE_SEVLEVEL_INFO
- ACQUIA_PURGE_SEVLEVEL_OK
- ACQUIA_PURGE_SEVLEVEL_WARNING
- ACQUIA_PURGE_SEVLEVEL_ERROR <-- blocks Acquia Purge from executing!
If you need to load a file before your test functions get called, add this: 'module_load_include' => array('inc', 'mymodule', 'ap_diagnostics')
See also
1 function implements hook_acquia_purge_diagnostics()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
1 invocation of hook_acquia_purge_diagnostics()
- AcquiaPurgeDiagnostics::initializeTestFunctionsList in lib/
AcquiaPurgeDiagnostics.php - Gather test function names from hook_acquia_purge_diagnostics().
File
- ./
acquia_purge.api.php, line 39 - Hooks provided by the Acquia Purge module.
Code
function hook_acquia_purge_diagnostics() {
return array(
'module_load_include' => array(
'inc',
'mymodule',
'ap_diagnostics',
),
'_mymodule_ap_diagnostic_apikey',
'_mymodule_ap_diagnostic_apirate',
);
}