UrlGenerator
in package
Url generator for rendering links in the twig templates.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- generate() : string|null
- generateGuideUrl() : string|null
- isGuideUrl() : bool
- withoutLeadingSlash() : string
Properties
$rendererChain read-only
private
LinkRenderer
$rendererChain
$router read-only
private
Router
$router
Methods
__construct()
public
__construct(LinkRenderer $rendererChain, Router $router) : mixed
Parameters
- $rendererChain : LinkRenderer
- $router : Router
generate()
public
generate(string|Path|Type|DescriptorAbstract|Fqsen|Reference|Fqsen $target, string $fallback) : string|null
Parameters
- $target : string|Path|Type|DescriptorAbstract|Fqsen|Reference|Fqsen
- $fallback : string
Return values
string|nullgenerateGuideUrl()
private
generateGuideUrl(string|Url $target) : string|null
Parameters
- $target : string|Url
Return values
string|nullisGuideUrl()
private
isGuideUrl(string|Url $target) : bool
Parameters
- $target : string|Url
Return values
boolwithoutLeadingSlash()
private
withoutLeadingSlash(string $path) : string
Parameters
- $path : string