public function SearchableHelpInterface::renderTopicForSearch in Drupal 8
Same name and namespace in other branches
- 9 core/modules/help_topics/src/SearchableHelpInterface.php \Drupal\help_topics\SearchableHelpInterface::renderTopicForSearch()
Renders one topic for search indexing or search results.
Parameters
string $topic_id: The ID of the topic to be indexed.
\Drupal\Core\Language\LanguageInterface $language: The language to render the topic in.
Return value
array An array of information about the topic, with elements:
- title: The title of the topic in this language.
- text: The text of the topic in this language.
- url: The URL of the topic as a \Drupal\Core\Url object.
- cacheable_metadata: (optional) An object to add as a cache dependency if this topic is shown in search results.
2 methods override SearchableHelpInterface::renderTopicForSearch()
- HelpTopicSection::renderTopicForSearch in core/
modules/ help_topics/ src/ Plugin/ HelpSection/ HelpTopicSection.php - Renders one topic for search indexing or search results.
- TestHelpSection::renderTopicForSearch in core/
modules/ help_topics/ tests/ modules/ help_topics_test/ src/ Plugin/ HelpSection/ TestHelpSection.php - Renders one topic for search indexing or search results.
File
- core/
modules/ help_topics/ src/ SearchableHelpInterface.php, line 44
Class
- SearchableHelpInterface
- Provides an interface for a HelpSection plugin that also supports search.
Namespace
Drupal\help_topicsCode
public function renderTopicForSearch($topic_id, LanguageInterface $language);