function TestHelpSection::listTopics
Returns a list of topics to show in the help section.
Return value
array A sorted list of topic links or render arrays for topic links. The links will be shown in the help section; if the returned array of links is empty, the section will be shown with some generic empty text.
Overrides HelpSectionPluginInterface::listTopics
File
- 
              core/
modules/ help_topics/ tests/ modules/ help_topics_test/ src/ Plugin/ HelpSection/ TestHelpSection.php, line 27  
Class
- TestHelpSection
 - Provides a searchable help section for testing.
 
Namespace
Drupal\help_topics_test\Plugin\HelpSectionCode
public function listTopics() {
  return [
    Link::fromTextAndUrl('Foo', Url::fromUri('https://foo.com')),
    Link::fromTextAndUrl('Bar', Url::fromUri('https://bar.com')),
  ];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.