public static function SearchApiAlgoliaBackend::create in Search API Algolia 3.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()
- 2.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 107
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'), $container
->get('search_api_algolia.helper'));
/** @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;
}