PHP Class Webiny\Component\Router\UrlGenerator

Inheritance: use trait Webiny\Component\StdLib\StdLibTrait, use trait Webiny\Component\Http\HttpTrait
Show file Open project: Webiny/Framework Class Usage Examples

Public Methods

Method Description
generate ( string $name, array $parameters = [], boolean $absolute = true ) : string Generate a url from a route.

Method Details

generate() public method

Generate a url from a route.
public generate ( string $name, array $parameters = [], boolean $absolute = true ) : string
$name string Name of the Route.
$parameters array List of parameters that need to be replaced within the Route path.
$absolute boolean Do you want to get the absolute url or relative. Default is absolute.
return string Generated url.