You are here

public function StandardSolrCloudConnector::setCollectionNameFromEndpoint in Search API Solr 8.3

Same name and namespace in other branches
  1. 4.x src/Plugin/SolrConnector/StandardSolrCloudConnector.php \Drupal\search_api_solr\Plugin\SolrConnector\StandardSolrCloudConnector::setCollectionNameFromEndpoint()

Temporarily set a different collection name for the connection.

Parameters

\Solarium\Core\Client\Endpoint|null $endpoint: Solr endpoint.

Overrides SolrCloudConnectorInterface::setCollectionNameFromEndpoint

File

src/Plugin/SolrConnector/StandardSolrCloudConnector.php, line 122

Class

StandardSolrCloudConnector
Standard Solr Cloud connector.

Namespace

Drupal\search_api_solr\Plugin\SolrConnector

Code

public function setCollectionNameFromEndpoint(Endpoint $endpoint) {
  $this->configuration['core'] = $endpoint
    ->getCollection() ?? $endpoint
    ->getCore();
}