You are here

public static function SearchApiSolrBackend::create in Search API Solr 8.2

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::create()
  2. 8 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::create()
  3. 4.x src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::create()

Creates an instance of the plugin.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the plugin.

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

Return value

static Returns an instance of this plugin.

Overrides BackendPluginBase::create

1 call to SearchApiSolrBackend::create()
SolrFieldNamesTest::testSolrFieldNames in tests/src/Kernel/SolrFieldNamesTest.php
@covers ::getSolrFieldNames

File

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

Class

SearchApiSolrBackend
Apache Solr backend for search api.

Namespace

Drupal\search_api_solr\Plugin\search_api\backend

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
  return new static($configuration, $plugin_id, $plugin_definition, $container
    ->get('module_handler'), $container
    ->get('config.factory')
    ->get('search_api_solr.settings'), $container
    ->get('language_manager'), $container
    ->get('plugin.manager.search_api_solr.connector'), $container
    ->get('search_api.fields_helper'), $container
    ->get('search_api.data_type_helper'), $container
    ->get('solarium.query_helper'));
}