You are here

public function HelpSearch::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/help_topics/src/Plugin/Search/HelpSearch.php \Drupal\help_topics\Plugin\Search\HelpSearch::__construct()

Constructs a \Drupal\help_search\Plugin\Search\HelpSearch object.

Parameters

array $configuration: Configuration for the plugin.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Database\Connection $database: The current database connection.

\Drupal\Core\Config\Config $search_settings: A config object for 'search.settings'.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.

\Drupal\Core\Session\AccountInterface $account: The $account object to use for checking for access to view help.

\Drupal\Core\State\StateInterface $state: The state object.

\Drupal\help\HelpSectionManager $help_section_manager: The help section manager.

\Drupal\search\SearchIndexInterface $search_index: The search index.

Overrides PluginBase::__construct

File

core/modules/help_topics/src/Plugin/Search/HelpSearch.php, line 147

Class

HelpSearch
Handles searching for help using the Search module index.

Namespace

Drupal\help_topics\Plugin\Search

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, Connection $database, Config $search_settings, LanguageManagerInterface $language_manager, MessengerInterface $messenger, AccountInterface $account, StateInterface $state, HelpSectionManager $help_section_manager, SearchIndexInterface $search_index) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->database = $database;
  $this->searchSettings = $search_settings;
  $this->languageManager = $language_manager;
  $this->messenger = $messenger;
  $this->account = $account;
  $this->state = $state;
  $this->helpSectionManager = $help_section_manager;
  $this->searchIndex = $search_index;
}