install_check_localization_server

install_check_localization_server($uri)

Checks if the localization server can be contacted.

Parameters

string $uri: The URI to contact.

Return value

string TRUE if the URI was contacted successfully, FALSE if not.

File

core/includes/install.core.inc, line 1391
API functions for installing Drupal.

Code

function install_check_localization_server($uri) {
  try {
    \Drupal::httpClient()->head($uri);
    return TRUE;
  }
  catch (RequestException $e) {
    return FALSE;
  }
}
doc_Drupal
2016-10-29 09:20:59
Comments
Leave a Comment

Please login to continue.