PageTypeLinkResolver

readonly class \TYPO3\CMS\Core\LinkHandling\PageTypeLinkResolver

Attributes

#[Autoconfigure]
$public: true
$shared: true

Table of Contents

Properties

$linkCodecService  : TypoLinkCodecService
$linkFactory  : LinkFactory
$linkService  : LinkService

Methods

__construct()  : mixed
getRedirectStatus()  : int|null
Determines the HTTP status for redirect in the middleware
resolvePageLinkUrl()  : string
Returns the resolved frontend link for a page with type link (doktype 3)
resolveTypolinkParts()  : array
Returns the decoded TypoLink parts like url, target, additional parameters etc.

Properties

Methods

getRedirectStatus()

Determines the HTTP status for redirect in the middleware

public getRedirectStatus(array $pageRecord) : int|null

If the destination is a page, we use 307 to preserve the request type For external URLs and custom types we use 303 see other. It prevents browsers from accidentally sending POST data to the external site.

Emails addresses, phone numbers and folders cannot be forwarded and return null.

Parameters

$pageRecord : array

Return values

int|null

resolvePageLinkUrl()

Returns the resolved frontend link for a page with type link (doktype 3)

public resolvePageLinkUrl(array $pageRecord, ServerRequestInterface $request[, ContentObjectRenderer|null $contentObjectRenderer = null ]) : string

Parameters

$pageRecord : array
$request : ServerRequestInterface
$contentObjectRenderer : ContentObjectRenderer|null = null

Return values

string

resolveTypolinkParts()

Returns the decoded TypoLink parts like url, target, additional parameters etc.

public resolveTypolinkParts(array $pageRecord) : array

merged with the resolved url part, which contains information about the link type (page, file, external, ..)

Parameters

$pageRecord : array

Return values

array
On this page