You are here

public static function Drupal::linkGenerator in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal.php \Drupal::linkGenerator()
  2. 9 core/lib/Drupal.php \Drupal::linkGenerator()

Returns the link generator service.

Return value

\Drupal\Core\Utility\LinkGeneratorInterface

1 call to Drupal::linkGenerator()
DrupalTest::testLinkGenerator in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the linkGenerator() method.

File

core/lib/Drupal.php, line 572

Class

Drupal
Static Service Container wrapper.

Code

public static function linkGenerator() {
  return static::getContainer()
    ->get('link_generator');
}