public static function AcquiaSearchSolrMessages::getNoPreferredIndexError in Acquia Connector 7.3
Returns message if preferred index not available.
Parameters
array $availableIndexesIds: Available index IDs.
Return value
string Message text.
2 calls to AcquiaSearchSolrMessages::getNoPreferredIndexError()
- _acquia_make_environment_url in acquia_search/
acquia_search.module - Ajjax callback to set enviroment fields in form.
- _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 125
Class
- AcquiaSearchSolrMessages
- Class AcquiaSearchSolrMessages.
Code
public static function getNoPreferredIndexError(array $availableIndexesIds) {
$parts = [
t('Could not find a Solr index corresponding to your website and environment.'),
];
if ($availableIndexesIds) {
$items = implode(', ', $availableIndexesIds);
$parts[] = t('Your subscription contains these indexes: @items.', [
'@items' => $items,
]);
}
$link = l(t('our documentation'), self::DOCS_URL);
$parts[] = t('To fix this problem, please read !link.', [
'!link' => $link,
]);
return implode(' ', $parts);
}