function _acquia_purge_diagnostics_acquia_environment in Acquia Purge 7
Acquia environment.
Parameters
string $t: Name of the t() function to call.
AcquiaPurgeService $service: The Acquia Purge service.
Return value
array 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
- ACQUIA_PURGE_SEVLEVEL_OK
- ACQUIA_PURGE_SEVLEVEL_WARNING
- ACQUIA_PURGE_SEVLEVEL_ERROR <-- blocks Acquia Purge from executing!
1 string reference to '_acquia_purge_diagnostics_acquia_environment'
File
- ./
acquia_purge.diagnostics.inc, line 175 - Diagnostic self-tests and reports that aim to prevent runtime misery.
Code
function _acquia_purge_diagnostics_acquia_environment($t, $service) {
$test = array(
'title' => $t('Acquia environment'),
);
if ($service
->hostingInfo()
->isThisAcquiaCloud()) {
$test['value'] = $t('Acquia Cloud (@name.@env)', array(
'@name' => $service
->hostingInfo()
->getSiteName(),
'@env' => $service
->hostingInfo()
->getSiteEnvironment(),
));
$test['severity'] = ACQUIA_PURGE_SEVLEVEL_INFO;
}
else {
$test['value'] = $t('Third-party');
$test['description'] = $t('Acquia Purge only works on Acquia Cloud and has' . ' disabled itself as this environment appears different. Any items in' . ' the queue will get processed as soon as you deployed your site.');
$test['severity'] = ACQUIA_PURGE_SEVLEVEL_ERROR;
}
return $test;
}