Contao Utils Bundle

RoutingUtil extends AbstractServiceSubscriber
in package

Table of Contents

Properties

$container  : ContainerInterface
$csrfTokenName  : string
$requestStack  : RequestStack
$router  : RouterInterface

Methods

__construct()  : mixed
generateBackendRoute()  : string
Generate a backend route with token and referer.
getSubscribedServices()  : array<string|int, mixed>

Properties

Methods

__construct()

public __construct(ContainerInterface $container, RouterInterface $router, string $csrfTokenName, RequestStack $requestStack) : mixed
Parameters
$container : ContainerInterface
$router : RouterInterface
$csrfTokenName : string
$requestStack : RequestStack

generateBackendRoute()

Generate a backend route with token and referer.

public generateBackendRoute([array<string|int, mixed> $params = [] ][, bool $addToken = true ][, bool $addReferer = true ][, string $route = 'contao_backend' ][, array<string|int, mixed> $options = [] ]) : string

Options:

  • absoluteUrl (bool): Return absolute url (default: false)
Parameters
$params : array<string|int, mixed> = []

Url-Parameters

$addToken : bool = true
$addReferer : bool = true
$route : string = 'contao_backend'
$options : array<string|int, mixed> = []
Tags
throws
ContainerExceptionInterface
throws
NotFoundExceptionInterface
Return values
string

The backend route url

getSubscribedServices()

public static getSubscribedServices() : array<string|int, mixed>
Tags
codeCoverageIgnore
Return values
array<string|int, mixed>

        
On this page

Search results