public static function SearchApiAlgoliaBackend::create in Search API Algolia 2.0.x
Same name and namespace in other branches
- 8 src/Plugin/search_api/backend/SearchApiAlgoliaBackend.php \Drupal\search_api_algolia\Plugin\search_api\backend\SearchApiAlgoliaBackend::create()
- 3.0.x src/Plugin/search_api/backend/SearchApiAlgoliaBackend.php \Drupal\search_api_algolia\Plugin\search_api\backend\SearchApiAlgoliaBackend::create()
File
- src/
Plugin/ search_api/ backend/ SearchApiAlgoliaBackend.php, line 95
Class
- SearchApiAlgoliaBackend
- Class SearchApiAlgoliaBackend.
Namespace
Drupal\search_api_algolia\Plugin\search_api\backendCode
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
$backend = new static($configuration, $plugin_id, $plugin_definition, $container
->get('language_manager'), $container
->get('config.factory'));
/** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */
$module_handler = $container
->get('module_handler');
$backend
->setModuleHandler($module_handler);
/** @var \Psr\Log\LoggerInterface $logger */
$logger = $container
->get('logger.channel.search_api_algolia');
$backend
->setLogger($logger);
return $backend;
}