function _acquia_purge_get_diagnosis_acquiacloud in Acquia Purge 6
Test whether the current hosting environment is Acquia Cloud.
@returns Associative array with the following 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, _OK, _WARNING, _ERROR
Parameters
string $t: Name of the t() function to call.
File
- ./
acquia_purge.diagnostics.inc, line 21 - Self-test diagnostic test functions for _acquia_purge_get_diagnosis().
Code
function _acquia_purge_get_diagnosis_acquiacloud($t) {
$site = _acquia_purge_get_site_name();
$test = array(
'title' => $t('Hosting environment'),
);
if (_acquia_purge_are_we_on_acquiacloud()) {
$test['value'] = $t('Acquia Cloud: @site', array(
'@site' => $site,
));
$test['severity'] = ACQUIA_PURGE_SEVLEVEL_OK;
}
else {
$test['value'] = $t('Third-party environment.');
$test['description'] = $t('You are not running on Acquia Cloud, this is a' . ' mandatory requirement for this module. The module will not process' . ' scheduled purges, once deployed scheduled purges will be processed.');
$test['severity'] = ACQUIA_PURGE_SEVLEVEL_ERROR;
}
return $test;
}