function HelpTopicDiscovery::getDefinitions
Same name in other branches
- 9 core/modules/help_topics/src/HelpTopicDiscovery.php \Drupal\help_topics\HelpTopicDiscovery::getDefinitions()
- 10 core/modules/help/src/HelpTopicDiscovery.php \Drupal\help\HelpTopicDiscovery::getDefinitions()
- 11.x core/modules/help/src/HelpTopicDiscovery.php \Drupal\help\HelpTopicDiscovery::getDefinitions()
Overrides DiscoveryTrait::getDefinitions
File
-
core/
modules/ help_topics/ src/ HelpTopicDiscovery.php, line 59
Class
- HelpTopicDiscovery
- Discovers help topic plugins from Twig files in help_topics directories.
Namespace
Drupal\help_topicsCode
public function getDefinitions() {
$plugins = $this->findAll();
// Flatten definitions into what's expected from plugins.
$definitions = [];
foreach ($plugins as $list) {
foreach ($list as $id => $definition) {
$definitions[$id] = $definition;
}
}
return $definitions;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.