function NodeSearch::__construct

Same name and namespace in other branches
  1. 11.x core/modules/node/src/Plugin/Search/NodeSearch.php \Drupal\node\Plugin\Search\NodeSearch::__construct()
  2. 10 core/modules/node/src/Plugin/Search/NodeSearch.php \Drupal\node\Plugin\Search\NodeSearch::__construct()
  3. 9 core/modules/node/src/Plugin/Search/NodeSearch.php \Drupal\node\Plugin\Search\NodeSearch::__construct()
  4. 8.9.x core/modules/node/src/Plugin/Search/NodeSearch.php \Drupal\node\Plugin\Search\NodeSearch::__construct()

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

Overrides SearchNode::__construct

File

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

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) {
  @trigger_error(__CLASS__ . ' is deprecated in drupal:11.4.0 and is removed from drupal:12.0.0. Instead, use \\Drupal\\search_node\\Plugin\\Search\\SearchNode. See https://www.drupal.org/node/3590298', E_USER_DEPRECATED);
  parent::__construct($configuration, $plugin_id, $plugin_definition, $this->database, $this->entityTypeManager, $this->moduleHandler, $this->searchSettings, $this->languageManager, $this->renderer, $messenger, $this->account, $this->databaseReplica, $this->searchIndex, $this->entityTypeBundleInfo);
  $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.