Heratio Framework API Reference

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
string

hasRouteName()

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
Return values
bool

        
On this page

Search results