function SearchIndex::__construct
Same name in other branches
- 9 core/modules/search/src/SearchIndex.php \Drupal\search\SearchIndex::__construct()
- 8.9.x core/modules/search/src/SearchIndex.php \Drupal\search\SearchIndex::__construct()
- 11.x 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.
\Drupal\Component\Datetime\TimeInterface|null $time: The time service
File
-
core/
modules/ search/ src/ SearchIndex.php, line 67
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, ?TimeInterface $time = NULL) {
$this->configFactory = $config_factory;
$this->connection = $connection;
$this->replica = $replica;
$this->cacheTagsInvalidator = $cache_tags_invalidator;
$this->textProcessor = $text_processor;
if (!$time) {
@trigger_error('Calling ' . __METHOD__ . '() without the $time argument is deprecated in drupal:10.3.0 and it will be required in drupal:11.0.0. See https://www.drupal.org/node/3387233', E_USER_DEPRECATED);
$this->time = \Drupal::service(TimeInterface::class);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.