public static function Drupal::urlGenerator in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal.php \Drupal::urlGenerator()
- 9 core/lib/Drupal.php \Drupal::urlGenerator()
Returns the url generator service.
Return value
\Drupal\Core\Routing\UrlGeneratorInterface The url generator service.
9 calls to Drupal::urlGenerator()
- DrupalTest::testUrlGenerator in core/
tests/ Drupal/ Tests/ Core/ DrupalTest.php - Tests the urlGenerator() method.
- FunctionsTest::testIndexedKeyedLinks in core/
modules/ system/ tests/ src/ Kernel/ Theme/ FunctionsTest.php - Tests links.html.twig using links with indexed keys.
- FunctionsTest::testLinks in core/
modules/ system/ tests/ src/ Kernel/ Theme/ FunctionsTest.php - Tests links.html.twig.
- RenderElementTypesTest::testMoreLink in core/
tests/ Drupal/ KernelTests/ Core/ Render/ Element/ RenderElementTypesTest.php - Tests system #type 'more_link'.
- RouteNoneTest::setUp in core/
tests/ Drupal/ KernelTests/ Core/ RouteProcessor/ RouteNoneTest.php
File
- core/
lib/ Drupal.php, line 563
Class
- Drupal
- Static Service Container wrapper.
Code
public static function urlGenerator() {
return static::getContainer()
->get('url_generator');
}