PageTypeLinkResolver
Read onlyYes
Used internally in handling and resolving pages of type link
Attributes
- #[Autoconfigure]
- $public: true
- $shared: true
Table of Contents
Properties
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
$linkCodecService
protected
TypoLinkCodecService
$linkCodecService
$linkFactory
protected
LinkFactory
$linkFactory
$linkService
protected
LinkService
$linkService
Methods
__construct()
public
__construct(TypoLinkCodecService $linkCodecService, LinkService $linkService, LinkFactory $linkFactory) : mixed
Parameters
- $linkCodecService : TypoLinkCodecService
- $linkService : LinkService
- $linkFactory : LinkFactory
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|nullresolvePageLinkUrl()
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
stringresolveTypolinkParts()
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>