function NodeSearch::__construct

Constructs a \Drupal\node\Plugin\Search\NodeSearch object.

Overrides ConfigurableSearchPluginBase::__construct

File

core/modules/node/src/Plugin/Search/NodeSearch.php, line 112

Class

NodeSearch
Handles searching for node entities using the Search module index.

Namespace

Drupal\node\Plugin\Search

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, protected Connection $database, protected EntityTypeManagerInterface $entityTypeManager, protected ModuleHandlerInterface $moduleHandler, protected Config $searchSettings, protected LanguageManagerInterface $languageManager, protected RendererInterface $renderer, MessengerInterface $messenger, protected AccountInterface $account, protected Connection $databaseReplica, protected SearchIndexInterface $searchIndex, protected EntityTypeBundleInfoInterface $entityTypeBundleInfo) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->setMessenger($messenger);
  $this->addCacheTags([
    'node_list',
  ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.