You are here

public function SearchApiAcquiaSearchMultiService::viewSettings in Acquia Search Multiple Indexes 7

Same name and namespace in other branches
  1. 8 src/Plugin/search_api/backend/SearchApiAcquiaSearchMultiService.php \SearchApiAcquiaSearchMultiService::viewSettings()

File

lib/Drupal/SearchApiSolr/SearchApiAcquiaSearchMultiService.php, line 82
Contains SearchApiAcquiaSearchMultiService.

Class

SearchApiAcquiaSearchMultiService
Provides automatic environment switching for Acquia Search servers.

Code

public function viewSettings() {

  // If Search API 1.10+ is used, this method is deprecated in favor of
  // getExtraInformation().
  if (method_exists('SearchApiAbstractService', 'getExtraInformation')) {
    return NULL;
  }
  $output = parent::viewSettings();

  // Set our special overrides, if applicable.
  $this
    ->setConnectionOptions();
  $options = $this->options;
  $auto_detection = isset($options['acquia_override_subscription']['acquia_override_auto_switch']) && $options['acquia_override_subscription']['acquia_override_auto_switch'];
  $auto_detection_state = $auto_detection ? t('enabled') : t('disabled');
  $output .= "<dl>\n  <dt>";
  $output .= t('Acquia Search Auto Detection');
  $output .= "</dt>\n  <dd>";
  $output .= t('Auto detection of your environment is <strong>@state</strong>', array(
    '@state' => $auto_detection_state,
  ));
  $output .= '</dd>';
  $output .= "\n</dl>";
  return $output;
}