PageTypeLinkResolver

Read onlyYes
Internal

Used internally in handling and resolving pages of type link

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<string|int, mixed>
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<string|int, mixed> $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<string|int, mixed>
Return values
int|null

resolvePageLinkUrl()

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

public resolvePageLinkUrl(array<string|int, mixed> $pageRecord, ServerRequestInterface $request[, ContentObjectRenderer|null $contentObjectRenderer = null ]) : string
Parameters
$pageRecord : array<string|int, mixed>
$request : ServerRequestInterface
$contentObjectRenderer : ContentObjectRenderer|null = null
Return values
string

resolveTypolinkParts()

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

public resolveTypolinkParts(array<string|int, mixed> $pageRecord) : array<string|int, mixed>

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

Parameters
$pageRecord : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results