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

Breadcrumb

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

function Drupal::urlGenerator

Returns the URL generator service.

Return value

\Drupal\Core\Routing\UrlGeneratorInterface The URL generator service.

1 call to Drupal::urlGenerator()
Url::urlGenerator in core/lib/Drupal/Core/Url.php
Gets the URL generator.

File

core/lib/Drupal.php, line 576

Class

Drupal
Static Service Container wrapper.

Code

public static function urlGenerator() {
    return static::getContainer()->get('url_generator');
}
RSS feed
Powered by Drupal