Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SearchableHelpInterface.php

function 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.
1 method overrides SearchableHelpInterface::renderTopicForSearch()
HelpTopicSection::renderTopicForSearch in core/modules/help/src/Plugin/HelpSection/HelpTopicSection.php
Renders one topic for search indexing or search results.

File

core/modules/help/src/SearchableHelpInterface.php, line 39

Class

SearchableHelpInterface
Provides an interface for a HelpSection plugin that also supports search.

Namespace

Drupal\help

Code

public function renderTopicForSearch($topic_id, LanguageInterface $language);
RSS feed
Powered by Drupal