You are here

public static function SearchApiSolrAcquiaConnector::create in Acquia Search 3.x

Same name and namespace in other branches
  1. 2.x src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php \Drupal\acquia_search\Plugin\SolrConnector\SearchApiSolrAcquiaConnector::create()

File

src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php, line 82

Class

SearchApiSolrAcquiaConnector
Class SearchApiSolrAcquiaConnector.

Namespace

Drupal\acquia_search\Plugin\SolrConnector

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {

  // Our schema (8.1.7) is newer than Solr's version, 4.1.1.
  $configuration['skip_schema_check'] = TRUE;
  $plugin = parent::create($container, $configuration, $plugin_id, $plugin_definition);
  $plugin->searchSubscriber = $container
    ->get('acquia_search.search_subscriber');
  $plugin->logger = $container
    ->get('logger.factory')
    ->get('acquia_search');
  $plugin->cache = $container
    ->get('cache.default');
  return $plugin;
}