function MetadataBubblingUrlGenerator::generate
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php \Drupal\Core\Render\MetadataBubblingUrlGenerator::generate()
- 10 core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php \Drupal\Core\Render\MetadataBubblingUrlGenerator::generate()
- 11.x core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php \Drupal\Core\Render\MetadataBubblingUrlGenerator::generate()
File
-
core/
lib/ Drupal/ Core/ Render/ MetadataBubblingUrlGenerator.php, line 94
Class
- MetadataBubblingUrlGenerator
- Decorator for the URL generator, which bubbles bubbleable URL metadata.
Namespace
Drupal\Core\RenderCode
public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH) : string {
$options['absolute'] = is_bool($referenceType) ? $referenceType : $referenceType === self::ABSOLUTE_URL;
$generated_url = $this->generateFromRoute($name, $parameters, $options, TRUE);
$this->bubble($generated_url);
return $generated_url->getGeneratedUrl();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.