You are here

public function BasicAuthTrait::viewSettings in Search API Solr 4.x

Same name and namespace in other branches
  1. 8.3 src/SolrConnector/BasicAuthTrait.php \Drupal\search_api_solr\SolrConnector\BasicAuthTrait::viewSettings()
  2. 8.2 src/SolrConnector/BasicAuthTrait.php \Drupal\search_api_solr\SolrConnector\BasicAuthTrait::viewSettings()

File

src/SolrConnector/BasicAuthTrait.php, line 86

Class

BasicAuthTrait
Basic auth functionality for a Solr connector.

Namespace

Drupal\search_api_solr\SolrConnector

Code

public function viewSettings() {
  $vars = [
    '%user' => $this->configuration['username'],
    '%pass' => str_repeat('*', strlen($this->configuration['password'])),
  ];
  $info[] = [
    'label' => $this
      ->t('Basic HTTP authentication'),
    'info' => $this
      ->t('Username: %user | Password: %pass', $vars),
  ];
  return $info;
}