RouterHelper
        
        extends Helper
    
    
            
            in package
            
        
    
    
    
        
            RouterHelper manages links between pages in a template context.
Tags
Table of Contents
- $generator : mixed
 - __construct() : mixed
 - getName() : mixed
 - {@inheritdoc}
 - path() : string
 - Generates a URL reference (as an absolute or relative path) to the route with the given parameters.
 - url() : string
 - Generates a URL reference (as an absolute URL or network path) to the route with the given parameters.
 
Properties
$generator
    protected
        mixed
    $generator
    
        
        
    
Methods
__construct()
    public
                    __construct(UrlGeneratorInterface $router) : mixed
        
        Parameters
- $router : UrlGeneratorInterface
 
Return values
mixed —getName()
{@inheritdoc}
    public
                    getName() : mixed
    
    
    
        Return values
mixed —path()
Generates a URL reference (as an absolute or relative path) to the route with the given parameters.
    public
                    path(string $name[, mixed $parameters = [] ][, bool $relative = false ]) : string
    
        Parameters
- $name : string
 - 
                    
The name of the route
 - $parameters : mixed = []
 - 
                    
An array of parameters
 - $relative : bool = false
 - 
                    
Whether to generate a relative or absolute path
 
Tags
Return values
string —The generated URL reference
url()
Generates a URL reference (as an absolute URL or network path) to the route with the given parameters.
    public
                    url(string $name[, mixed $parameters = [] ][, bool $schemeRelative = false ]) : string
    
        Parameters
- $name : string
 - 
                    
The name of the route
 - $parameters : mixed = []
 - 
                    
An array of parameters
 - $schemeRelative : bool = false
 - 
                    
Whether to omit the scheme in the generated URL reference
 
Tags
Return values
string —The generated URL reference