ShortcutAndMountPointRedirect

class \TYPO3\CMS\Frontend\Middleware\ShortcutAndMountPointRedirect

Implements
MiddlewareInterface, LoggerAwareInterface
Uses
LoggerAwareTrait

Checks mount points, shortcuts and redirects to the target.

Alternatively, checks if the current page is a redirect to an external page

Table of Contents

Interfaces

MiddlewareInterface
LoggerAwareInterface

Methods

process()  : ResponseInterface
getRedirectUri()  : string|null
getRedirectUriForMountPoint()  : string|null
Returns URI of target page, if the current page is an overlaid mountpoint.
getRedirectUriForShortcut()  : string|null
Returns URI of target page, if the current page is a Shortcut.
getUriToCurrentPageForRedirect()  : string
prefixExternalPageUrl()  : string
Returns the redirect URL for the input page row IF the doktype is set to 3.

Methods

process()

public process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface

Parameters

$request : ServerRequestInterface
$handler : RequestHandlerInterface

Return values

ResponseInterface

getRedirectUri()

protected getRedirectUri(ServerRequestInterface $request) : string|null

Parameters

$request : ServerRequestInterface

Return values

string|null

getRedirectUriForMountPoint()

Returns URI of target page, if the current page is an overlaid mountpoint.

protected getRedirectUriForMountPoint(ServerRequestInterface $request) : string|null

If the current page is of type mountpoint and should be overlaid with the contents of the mountpoint page and is accessed directly, the user will be redirected to the mountpoint context.

Parameters

$request : ServerRequestInterface

Return values

string|null

getRedirectUriForShortcut()

Returns URI of target page, if the current page is a Shortcut.

protected getRedirectUriForShortcut(ServerRequestInterface $request) : string|null

If the current page is of type shortcut and accessed directly via its URL, the user will be redirected to shortcut target.

Parameters

$request : ServerRequestInterface

Return values

string|null

getUriToCurrentPageForRedirect()

protected getUriToCurrentPageForRedirect(ServerRequestInterface $request) : string

Parameters

$request : ServerRequestInterface

Return values

string

prefixExternalPageUrl()

Returns the redirect URL for the input page row IF the doktype is set to 3.

protected prefixExternalPageUrl(string $redirectTo, string $sitePrefix) : string

Parameters

$redirectTo : string

The page row to return URL type for

$sitePrefix : string

if no protocol or relative path given, the site prefix is added

Return values

string —

The URL from based on the external page URL given with a prefix.

On this page