protected function Url::urlGenerator in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Url.php \Drupal\Core\Url::urlGenerator()
- 10 core/lib/Drupal/Core/Url.php \Drupal\Core\Url::urlGenerator()
Gets the URL generator.
Return value
\Drupal\Core\Routing\UrlGeneratorInterface The URL generator.
File
- core/
lib/ Drupal/ Core/ Url.php, line 858
Class
- Url
- Defines an object that holds information about a URL.
Namespace
Drupal\CoreCode
protected function urlGenerator() {
if (!$this->urlGenerator) {
$this->urlGenerator = \Drupal::urlGenerator();
}
return $this->urlGenerator;
}