phpDocumentor

UrlGenerator
in package

Url generator for rendering links in the twig templates.

Tags
todo

Why is this a separate URL Generator on top of the Router, specific for the LinkRenderer? Are we missing a concept? At the moment, I am not going into this because my PR is getting too big already and I keep existing behaviour, but discovering why this Url Generator even exists could improve the codebase.

Table of Contents

Properties

$rendererChain  : LinkRenderer
$router  : Router

Methods

__construct()  : mixed
generate()  : string|null
generateGuideUrl()  : string|null
isGuideUrl()  : bool
withoutLeadingSlash()  : string

Properties

Methods

generateGuideUrl()

private generateGuideUrl(string|Url $target) : string|null
Parameters
$target : string|Url
Return values
string|null

isGuideUrl()

private isGuideUrl(string|Url $target) : bool
Parameters
$target : string|Url
Return values
bool

withoutLeadingSlash()

private withoutLeadingSlash(string $path) : string
Parameters
$path : string
Return values
string

        
On this page

Search results