public function NodeSearch::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/node/src/Plugin/Search/NodeSearch.php \Drupal\node\Plugin\Search\NodeSearch::__construct()
Constructs a \Drupal\node\Plugin\Search\NodeSearch object.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin_id for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Database\Connection $database: A database connection object.
\Drupal\Core\Entity\EntityManagerInterface $entity_manager: An entity manager object.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: A module manager object.
\Drupal\Core\Config\Config $search_settings: A config object for 'search.settings'.
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.
\Drupal\Core\Session\AccountInterface $account: The $account object to use for checking for access to advanced search.
Overrides ConfigurableSearchPluginBase::__construct
File
- core/
modules/ node/ src/ Plugin/ Search/ NodeSearch.php, line 162 - Contains \Drupal\node\Plugin\Search\NodeSearch.
Class
- NodeSearch
- Handles searching for node entities using the Search module index.
Namespace
Drupal\node\Plugin\SearchCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, Connection $database, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, Config $search_settings, LanguageManagerInterface $language_manager, RendererInterface $renderer, AccountInterface $account = NULL) {
$this->database = $database;
$this->entityManager = $entity_manager;
$this->moduleHandler = $module_handler;
$this->searchSettings = $search_settings;
$this->languageManager = $language_manager;
$this->renderer = $renderer;
$this->account = $account;
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this
->addCacheTags([
'node_list',
]);
}