function HelpSearch::getSectionPlugin
Same name in other branches
- 9 core/modules/help_topics/src/Plugin/Search/HelpSearch.php \Drupal\help_topics\Plugin\Search\HelpSearch::getSectionPlugin()
- 8.9.x core/modules/help_topics/src/Plugin/Search/HelpSearch.php \Drupal\help_topics\Plugin\Search\HelpSearch::getSectionPlugin()
- 10 core/modules/help/src/Plugin/Search/HelpSearch.php \Drupal\help\Plugin\Search\HelpSearch::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 HelpSearch::getSectionPlugin()
- HelpSearch::prepareResults in core/
modules/ help/ src/ Plugin/ Search/ HelpSearch.php - Prepares search results for display.
- HelpSearch::updateIndex in core/
modules/ help/ src/ Plugin/ Search/ HelpSearch.php - HelpSearch::updateTopicList in core/
modules/ help/ src/ Plugin/ Search/ HelpSearch.php - Rebuilds the database table containing topics to be indexed.
File
-
core/
modules/ help/ src/ Plugin/ Search/ HelpSearch.php, line 519
Class
- HelpSearch
- Handles searching for help using the Search module index.
Namespace
Drupal\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.