AbstractTypolinkBuilder

AbstractYes

Abstract class to provide proper helper for most types necessary

Table of Contents

Methods

encodeFallbackLinkTextIfLinkTextIsEmpty()  : string
Helper method to a fallback method properly encoding HTML.
forceAbsoluteUrl()  : string
Forces a given URL to be absolute.
resolveTargetAttribute()  : string
Creates the value for target="..." in a typolink configuration

Methods

encodeFallbackLinkTextIfLinkTextIsEmpty()

Helper method to a fallback method properly encoding HTML.

protected encodeFallbackLinkTextIfLinkTextIsEmpty(string $originalLinkText, string $fallbackLinkText) : string
Parameters
$originalLinkText : string

the original string, if empty, the fallback link text

$fallbackLinkText : string

the string to be used.

Return values
string

the final text

forceAbsoluteUrl()

Forces a given URL to be absolute.

protected forceAbsoluteUrl(string $url, array<string|int, mixed> $configuration[, ServerRequestInterface|null $request = null ]) : string
Parameters
$url : string

The URL to be forced to be absolute

$configuration : array<string|int, mixed>

TypoScript configuration of typolink

$request : ServerRequestInterface|null = null
Return values
string

The absolute URL

resolveTargetAttribute()

Creates the value for target="..." in a typolink configuration

protected resolveTargetAttribute(array<string|int, mixed> $conf, string $name[, ContentObjectRenderer|null $contentObjectRenderer = null ]) : string
Parameters
$conf : array<string|int, mixed>

the typolink configuration

$name : string

the key, usually "target", "extTarget" or "fileTarget"

$contentObjectRenderer : ContentObjectRenderer|null = null
Return values
string

the value of the target attribute, if there is one

On this page

Search results