You are here

protected function SearchApiSolrBackend::getSolrConnectorOptions in Search API Solr 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getSolrConnectorOptions()
  2. 8.2 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getSolrConnectorOptions()
  3. 4.x src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getSolrConnectorOptions()

Returns all available backend plugins, as an options list.

Return value

string[] An associative array mapping backend plugin IDs to their (HTML-escaped) labels.

1 call to SearchApiSolrBackend::getSolrConnectorOptions()
SearchApiSolrBackend::buildConfigurationForm in src/Plugin/search_api/backend/SearchApiSolrBackend.php
Form constructor.

File

src/Plugin/search_api/backend/SearchApiSolrBackend.php, line 303

Class

SearchApiSolrBackend
Apache Solr backend for search api.

Namespace

Drupal\search_api_solr\Plugin\search_api\backend

Code

protected function getSolrConnectorOptions() {
  $options = [];
  foreach ($this->solrConnectorPluginManager
    ->getDefinitions() as $plugin_id => $plugin_definition) {
    $options[$plugin_id] = Html::escape($plugin_definition['label']);
  }
  return $options;
}