SfRoutingAdapter
in package
Minimal routing adapter for standalone URL generation.
Table of Contents
Methods
- generate() : string
- Generate a URL for a named route.
- hasRouteName() : bool
- Check if a named route exists.
Methods
generate()
Generate a URL for a named route.
public
generate(string $routeName[, array<string|int, mixed> $params = [] ]) : string
Provides a best-effort translation from Symfony route names to URLs. Named routes (@name) are converted to /name paths with parameter substitution.
Parameters
- $routeName : string
- $params : array<string|int, mixed> = []
Return values
stringhasRouteName()
Check if a named route exists.
public
hasRouteName(string $name) : bool
Used by theme templates to conditionally show menu items based on which plugins have registered routes.
Parameters
- $name : string