function SearchHelpSearch::getSectionPlugin
Same name and namespace in other branches
- 11.x core/modules/search/modules/search_help/src/Plugin/Search/SearchHelpSearch.php \Drupal\search_help\Plugin\Search\SearchHelpSearch::getSectionPlugin()
Instantiates a help section plugin and verifies it is searchable.
Parameters
string $section_plugin_id: Type of plugin to instantiate.
Return value
\Drupal\help\SearchableHelpInterface|false Plugin object, or FALSE if it is not searchable.
3 calls to SearchHelpSearch::getSectionPlugin()
- SearchHelpSearch::prepareResults in core/
modules/ search/ modules/ search_help/ src/ Plugin/ Search/ SearchHelpSearch.php - Prepares search results for display.
- SearchHelpSearch::updateIndex in core/
modules/ search/ modules/ search_help/ src/ Plugin/ Search/ SearchHelpSearch.php - Updates the search index for this plugin.
- SearchHelpSearch::updateTopicList in core/
modules/ search/ modules/ search_help/ src/ Plugin/ Search/ SearchHelpSearch.php - Rebuilds the database table containing topics to be indexed.
File
-
core/
modules/ search/ modules/ search_help/ src/ Plugin/ Search/ SearchHelpSearch.php, line 449
Class
- SearchHelpSearch
- Handles searching for help using the Search module index.
Namespace
Drupal\search_help\Plugin\SearchCode
protected function getSectionPlugin($section_plugin_id) {
/** @var \Drupal\help\HelpSectionPluginInterface $section_plugin */
$section_plugin = $this->helpSectionManager
->createInstance($section_plugin_id);
// Intentionally return boolean to allow caching of results.
return $section_plugin instanceof SearchableHelpInterface ? $section_plugin : FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.