public static function Messages::getServerUrlMessage in Acquia Search 3.x
Get text showing the current URL based on configuration.
Parameters
array $configuration: A configuration array containing scheme, host, port and path.
Return value
\Drupal\Core\StringTranslation\TranslatableMarkup Translatable markup showing the current URL based on configuration.
1 call to Messages::getServerUrlMessage()
- Messages::getSearchStatusMessage in src/
Helper/ Messages.php - Returns formatted message about Acquia Search connection details.
File
- src/
Helper/ Messages.php, line 164
Class
- Messages
- Class Messages.
Namespace
Drupal\acquia_search\HelperCode
public static function getServerUrlMessage(array $configuration) : TranslatableMarkup {
if (empty($configuration['host'])) {
$url = t('N/A');
}
else {
$url = $configuration['scheme'] . '://' . $configuration['host'] . ':' . $configuration['port'] . $configuration['path'];
}
return t('URL: @url', [
'@url' => $url,
]);
}