You are here

public function SearchApiAcquiaSearchService::viewSettings in Acquia Search for Search API 7

Same name and namespace in other branches
  1. 7.2 includes/SearchApiAcquiaSearchService.php \SearchApiAcquiaSearchService::viewSettings()

View this server's settings.

Overrides SearchApiSolrService::viewSettings

File

includes/SearchApiAcquiaSearchService.php, line 32
Contains SearchApiAcquiaSearchService.

Class

SearchApiAcquiaSearchService
Search API service class for Acquia Search.

Code

public function viewSettings() {
  $output = '';

  // Set our special overrides if applicable
  $this
    ->setConnectionOptions();
  $options = $this->options;
  $url = $options['scheme'] . '://' . $options['host'] . ':' . $options['port'] . $options['path'];
  $output .= "<dl>\n  <dt>";
  $output .= t('Acquia Search Server');
  $output .= "</dt>\n  <dd>";
  $output .= $url;
  $output .= '</dd>';
  if ($options['http_user']) {
    $output .= "\n  <dt>";
    $output .= t('Basic HTTP authentication');
    $output .= "</dt>\n  <dd>";
    $output .= t('Username: @user', array(
      '@user' => $options['http_user'],
    ));
    $output .= "</dd>\n  <dd>";
    $output .= t('Password: @pass', array(
      '@pass' => str_repeat('*', strlen($options['http_pass'])),
    ));
    $output .= '</dd>';
  }
  $output .= "\n</dl>";
  return $output;
}