function HelpTopicPluginInterface::toLink

Same name in other branches
  1. 8.9.x core/modules/help_topics/src/HelpTopicPluginInterface.php \Drupal\help_topics\HelpTopicPluginInterface::toLink()
  2. 10 core/modules/help/src/HelpTopicPluginInterface.php \Drupal\help\HelpTopicPluginInterface::toLink()
  3. 11.x core/modules/help/src/HelpTopicPluginInterface.php \Drupal\help\HelpTopicPluginInterface::toLink()

Returns a link for viewing the help topic.

Parameters

string|null $text: (optional) Link text to use for the link. If NULL, defaults to the topic title.

array $options: (optional) See \Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute() for the available options.

Return value

\Drupal\Core\Link A link object for viewing the topic.

1 method overrides HelpTopicPluginInterface::toLink()
HelpTopicPluginBase::toLink in core/modules/help_topics/src/HelpTopicPluginBase.php
Returns a link for viewing the help topic.

File

core/modules/help_topics/src/HelpTopicPluginInterface.php, line 81

Class

HelpTopicPluginInterface
Defines an interface for help topic plugin classes.

Namespace

Drupal\help_topics

Code

public function toLink($text = NULL, array $options = []);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.