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

Breadcrumb

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

function HelpTopicPluginBase::toLink

Overrides HelpTopicPluginInterface::toLink

File

core/modules/help/src/HelpTopicPluginBase.php, line 55

Class

HelpTopicPluginBase
Base class for help topic plugins.

Namespace

Drupal\help

Code

public function toLink($text = NULL, array $options = []) {
    if (!$text) {
        $text = $this->getLabel();
    }
    return Link::createFromRoute($text, 'help.help_topic', [
        'id' => $this->getPluginId(),
    ], $options);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal