BeforeRedirectMatchDomainEvent

final class \TYPO3\CMS\Redirects\Event\BeforeRedirectMatchDomainEvent

This event is fired in \TYPO3\CMS\Redirects\Service\RedirectService->matchRedirect() for checked host and wildcard host "*".

It can be used to implement a custom match method, returning a matchedRedirect record with eventually enriched record data.

Table of Contents

Methods

__construct()  : mixed
getDomain()  : string
getMatchDomainName()  : string
getMatchedRedirect()  : array|null
getPath()  : string
getQuery()  : string
setMatchedRedirect()  : void

Methods

__construct()

public __construct(string $domain, string $path, string $query, string $matchDomainName) : mixed

Parameters

$domain : string
$path : string
$query : string
$matchDomainName : string

getDomain()

public getDomain() : string

Return values

string —

Request domain name (host)

getMatchDomainName()

public getMatchDomainName() : string

Return values

string —

Domain name which should be checked, and getRedirects() items are provided for

getMatchedRedirect()

public getMatchedRedirect() : array|null

Return values

array|null —

Returns the matched sys_redirect record or null

getPath()

public getPath() : string

Return values

string —

Request path

getQuery()

public getQuery() : string

Return values

string —

Request query parameters

setMatchedRedirect()

public setMatchedRedirect(array|null $matchedRedirect) : void

Parameters

$matchedRedirect : array|null

Set matched sys_redirect record or null to clear prior set record

On this page