public static function AcquiaSearchSolrMessages::getSearchStatusMessage in Acquia Connector 7.3
Returns connection status message for search environment.
Parameters
array $environment: Search environment.
Return value
mixed Message text.
1 call to AcquiaSearchSolrMessages::getSearchStatusMessage()
- _acquia_search_solr_add_search_status_message in acquia_search/
includes/ acquia_search_solr.helpers.inc - Appends search status message to form.
File
- acquia_search/
includes/ AcquiaSearchSolrMessages.php, line 87
Class
- AcquiaSearchSolrMessages
- Class AcquiaSearchSolrMessages.
Code
public static function getSearchStatusMessage(array $environment) {
$items = [
t('apachesolr.module environment ID: @env', [
'@env' => $environment['env_id'],
]),
t('URL: @url', [
'@url' => $environment['url'],
]),
];
if (AcquiaSearchSolrEnvironment::ping($environment['env_id'])) {
$items[] = self::pingSuccessful();
}
else {
$items[] = [
'data' => self::pingFailed(),
'class' => [
'error',
],
];
}
// Ping the Solr index to ensure authentication is working.
if (AcquiaSearchSolrEnvironment::pingWithAuthCheck($environment['env_id'])) {
$items[] = self::authenticationChecksSuccess();
}
else {
$items[] = [
'data' => self::authenticationChecksFailed(),
'class' => [
'error',
],
];
}
$list = theme('item_list', [
'items' => $items,
]);
return t('Connection managed by Acquia Search module. !list', [
'!list' => $list,
]);
}