You are here

public static function Drupal::urlGenerator in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal.php \Drupal::urlGenerator()

Returns the url generator service.

Return value

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

4 calls to Drupal::urlGenerator()
DrupalTest::testUrlGenerator in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the urlGenerator() method.
RouteNoneTest::setUp in core/modules/system/src/Tests/RouteProcessor/RouteNoneTest.php
Performs setup tasks before each individual test method is run.
RouteProcessorCurrentIntegrationTest::setUp in core/modules/system/src/Tests/RouteProcessor/RouteProcessorCurrentIntegrationTest.php
Performs setup tasks before each individual test method is run.
Url::urlGenerator in core/lib/Drupal/Core/Url.php
Gets the URL generator.

File

core/lib/Drupal.php, line 504
Contains \Drupal.

Class

Drupal
Static Service Container wrapper.

Code

public static function urlGenerator() {
  return static::getContainer()
    ->get('url_generator');
}