You are here

public function HelpTopicPluginBase::toUrl in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/help_topics/src/HelpTopicPluginBase.php \Drupal\help_topics\HelpTopicPluginBase::toUrl()

Returns the URL for viewing the help topic.

Parameters

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

Return value

\Drupal\Core\Url A URL object containing the URL for viewing the help topic.

Overrides HelpTopicPluginInterface::toUrl

File

core/modules/help_topics/src/HelpTopicPluginBase.php, line 50

Class

HelpTopicPluginBase
Base class for help topic plugins.

Namespace

Drupal\help_topics

Code

public function toUrl(array $options = []) {
  return Url::fromRoute('help.help_topic', [
    'id' => $this
      ->getPluginId(),
  ], $options);
}