You are here

function acquia_search_environment_connected in Acquia Connector 7.3

Same name and namespace in other branches
  1. 7 acquia_search/acquia_search.module \acquia_search_environment_connected()
  2. 7.2 acquia_search/acquia_search.module \acquia_search_environment_connected()

Tests whether the environment is connected to Acquia Search.

4 calls to acquia_search_environment_connected()
acquia_search_apachesolr_query_alter in acquia_search/acquia_search.module
Implements hook_apachesolr_modify_query().
acquia_search_form_apachesolr_environment_edit_form_alter in acquia_search/acquia_search.module
Implements hook_form_FORM_ID_alter().
acquia_search_form_apachesolr_index_action_form_alter in acquia_search/acquia_search.module
Implements hook_form_FORM_ID_alter().
acquia_search_help in acquia_search/acquia_search.module
Implements hook_help().

File

acquia_search/acquia_search.module, line 419
Integration between Acquia Drupal and Acquia's hosted solr search service.

Code

function acquia_search_environment_connected($environment) {
  if (in_array($environment['service_class'], [
    AcquiaSearchService::class,
    AcquiaSearchSolrService::class,
  ])) {
    return TRUE;
  }
  $acquia_search_key = apachesolr_environment_variable_get($environment['env_id'], 'acquia_search_key');
  if (!empty($acquia_search_key)) {
    return TRUE;
  }
  return FALSE;
}