public static function Drupal::urlGenerator in Drupal 8
Same name and namespace in other branches
- 9 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/
tests/ Drupal/ KernelTests/ Core/ RouteProcessor/ RouteNoneTest.php - RouteProcessorCurrentIntegrationTest::setUp in core/
tests/ Drupal/ KernelTests/ Core/ RouteProcessor/ RouteProcessorCurrentIntegrationTest.php - Url::urlGenerator in core/
lib/ Drupal/ Core/ Url.php - Gets the URL generator.
File
- core/
lib/ Drupal.php, line 551 - Contains \Drupal.
Class
- Drupal
- Static Service Container wrapper.
Code
public static function urlGenerator() {
return static::getContainer()
->get('url_generator');
}