You are here

protected function PantheonSolrConnector::internalConfiguration in Search API Pantheon 8

This configuration is needed by the parent class.

However, as far as the Drupal Config Management sysytem is concerned the only exportable, user-changable configuration is the schema file.

1 call to PantheonSolrConnector::internalConfiguration()
PantheonSolrConnector::__construct in src/Plugin/SolrConnector/PantheonSolrConnector.php

File

src/Plugin/SolrConnector/PantheonSolrConnector.php, line 64
Provide a connection to Pantheon's Solr instance.

Class

PantheonSolrConnector
Standard Solr connector.

Namespace

Drupal\search_api_pantheon\Plugin\SolrConnector

Code

protected function internalConfiguration() {
  $pantheon_specific_configuration = [];
  if (!empty($_ENV['PANTHEON_ENVIRONMENT'])) {
    $pantheon_specific_configuration = [
      'scheme' => 'https',
      'host' => $_ENV['PANTHEON_INDEX_HOST'],
      'port' => $_ENV['PANTHEON_INDEX_PORT'],
      'path' => '/sites/self/environments/' . $_ENV['PANTHEON_ENVIRONMENT'] . '/index',
    ];
  }
  return $pantheon_specific_configuration + parent::defaultConfiguration();
}