DatabaseRecordLinkBuilder

readonly class \TYPO3\CMS\Frontend\Typolink\DatabaseRecordLinkBuilder

Implements
TypolinkBuilderInterface

Builds a TypoLink to a database record

Table of Contents

Interfaces

TypolinkBuilderInterface
Used to generate a link to a page or file, an external URL or any other protocol in the frontend or backend.

Methods

__construct()  : mixed
buildLink()  : LinkResultInterface
getPageTsConfig()  : array
Helper method to calculate pageTsConfig in frontend scope, we can't use BackendUtility::getPagesTSconfig() here.
getTargetLanguageAspect()  : LanguageAspect|null
Returns the language aspect of the target language, if the link selects one by "_language" or "L" (in this order of precedence, as done by PageLinkBuilder).

Methods

public buildLink(array $linkDetails, array $configuration, ServerRequestInterface $request[, string $linkText = '' ]) : LinkResultInterface

Parameters

$linkDetails : array

parsed link details by the LinkService

$configuration : array

the TypoLink configuration array

$request : ServerRequestInterface
$linkText : string = ''

the link text

Return values

LinkResultInterface

getPageTsConfig()

Helper method to calculate pageTsConfig in frontend scope, we can't use BackendUtility::getPagesTSconfig() here.

protected getPageTsConfig(ServerRequestInterface $request) : array

Parameters

$request : ServerRequestInterface

Return values

array

getTargetLanguageAspect()

Returns the language aspect of the target language, if the link selects one by "_language" or "L" (in this order of precedence, as done by PageLinkBuilder).

protected getTargetLanguageAspect(array $queryParameters, array $typoScriptConfiguration, array $configuration, ServerRequestInterface $request) : LanguageAspect|null

Returns null, if the current language applies.

Parameters

$queryParameters : array
$typoScriptConfiguration : array
$configuration : array
$request : ServerRequestInterface

Return values

LanguageAspect|null
On this page