public static function Messages::getServerAvailabilityMessage in Acquia Search 3.x
Get text describing availability for the given server.
Parameters
\Drupal\search_api\Entity\Server $server: Search server configuration entity.
Return value
array|\Drupal\Core\StringTranslation\TranslatableMarkup Solr server availability message.
Throws
\Drupal\search_api\SearchApiException
1 call to Messages::getServerAvailabilityMessage()
- Messages::getSearchStatusMessage in src/
Helper/ Messages.php - Returns formatted message about Acquia Search connection details.
File
- src/
Helper/ Messages.php, line 201
Class
- Messages
- Class Messages.
Namespace
Drupal\acquia_search\HelperCode
public static function getServerAvailabilityMessage(Server $server) {
if ($server
->getBackend()
->getSolrConnector()
->pingCore()) {
return t('Solr core is currently reachable and up.');
}
return [
'#markup' => '<span class="color-error">' . t('Solr core is currently unreachable.') . '</span>',
];
}