You are here

public static function SearchApiElasticsearchBackend::create in Elasticsearch Connector 8.5

Same name and namespace in other branches
  1. 8.7 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::create()
  2. 8 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::create()
  3. 8.2 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::create()
  4. 8.6 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::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

File

src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php, line 219

Class

SearchApiElasticsearchBackend
Elasticsearch Search API Backend definition.

Namespace

Drupal\elasticsearch_connector\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('form_builder'), $container
    ->get('module_handler'), $container
    ->get('elasticsearch_connector.client_manager'), $container
    ->get('config.factory')
    ->get('elasticsearch.settings'), $container
    ->get('logger.factory')
    ->get('elasticconnector_sapi'), $container
    ->get('elasticsearch_connector.cluster_manager'), $container
    ->get('entity_type.manager'), $container
    ->get('elasticsearch_connector.index_factory'));
}