public function SearchIndex::__construct in Drupal 9
Same name and namespace in other branches
- 8 core/modules/search/src/SearchIndex.php \Drupal\search\SearchIndex::__construct()
SearchIndex constructor.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\Database\Connection $connection: The database connection.
\Drupal\Core\Database\Connection $replica: The database replica connection.
\Drupal\Core\Cache\CacheTagsInvalidatorInterface $cache_tags_invalidator: The cache tags invalidator.
\Drupal\search\SearchTextProcessorInterface $text_processor: The text processor.
File
- core/
modules/ search/ src/ SearchIndex.php, line 64
Class
- SearchIndex
- Provides search index management functions.
Namespace
Drupal\searchCode
public function __construct(ConfigFactoryInterface $config_factory, Connection $connection, Connection $replica, CacheTagsInvalidatorInterface $cache_tags_invalidator, SearchTextProcessorInterface $text_processor = NULL) {
$this->configFactory = $config_factory;
$this->connection = $connection;
$this->replica = $replica;
$this->cacheTagsInvalidator = $cache_tags_invalidator;
if ($text_processor === NULL) {
@trigger_error('Calling ' . __METHOD__ . ' without $text_processor argument is deprecated in drupal:9.1.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3078162', E_USER_DEPRECATED);
$text_processor = \Drupal::service('search.text_processor');
}
$this->textProcessor = $text_processor;
}