function SearchNode::__construct

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

Overrides ConfigurableSearchPluginBase::__construct

1 call to SearchNode::__construct()
NodeSearch::__construct in core/modules/node/src/Plugin/Search/NodeSearch.php
Constructs a \Drupal\node\Plugin\Search\NodeSearch object.
1 method overrides SearchNode::__construct()
NodeSearch::__construct in core/modules/node/src/Plugin/Search/NodeSearch.php
Constructs a \Drupal\node\Plugin\Search\NodeSearch object.

File

core/modules/search/modules/search_node/src/Plugin/Search/SearchNode.php, line 112

Class

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

Namespace

Drupal\search_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.