TypolinkViewHelper extends AbstractViewHelper

ViewHelper

This class is the implementation of a Fluid ViewHelper.

View this class in the TYPO3 ViewHelper reference: <f:link.typolink>

FinalYes

A ViewHelper to create links from fields supported by the link wizard

Example

{link} contains: t3://page?uid=2&arg1=val1#9 _blank some-css-class "Title containing Whitespace".

Or a legacy version from older TYPO3 versions: {link} contains: 9 _blank - "testtitle with whitespace" &X=y.

Minimal usage

::

<f:link.typolink parameter="{link}"> Linktext </f:link.typolink>

Output::

Linktext

Depending on current page, routing and page path configuration.

TextWrap usage

::

<f:link.typolink parameter="123" textWrap="|"/>

Output::

Page title of some page wrapped in span

Depending on current page, routing and page path configuration.

Full parameter usage

::

<f:link.typolink parameter="{link}" additionalParams="&u=b" target="_blank" class="ico-class" title="some title" additionalAttributes="{type:'button'}"

  Linktext

</f:link.typolink>

Output::

Linktext

Depending on routing and page path configuration.

Table of Contents

Properties

$escapeOutput  : bool

Methods

initializeArguments()  : void
render()  : string
invokeContentObjectRenderer()  : string
mergeTypoLinkConfiguration()  : array<string|int, mixed>
Merges view helper arguments with typolink parts.
serializeTagParameters()  : string

Properties

$escapeOutput

protected bool $escapeOutput = false

Methods

initializeArguments()

public initializeArguments() : void

render()

public render() : string
Tags
throws
InvalidArgumentException
throws
UnexpectedValueException
Return values
string

invokeContentObjectRenderer()

protected static invokeContentObjectRenderer(array<string|int, mixed> $arguments, string $typoLinkParameter, string $content, ServerRequestInterface|null $request) : string
Parameters
$arguments : array<string|int, mixed>
$typoLinkParameter : string
$content : string
$request : ServerRequestInterface|null
Return values
string

mergeTypoLinkConfiguration()

Merges view helper arguments with typolink parts.

protected static mergeTypoLinkConfiguration(array<string|int, mixed> $typoLinkConfiguration, array<string|int, mixed> $arguments) : array<string|int, mixed>
Parameters
$typoLinkConfiguration : array<string|int, mixed>
$arguments : array<string|int, mixed>
Return values
array<string|int, mixed>

serializeTagParameters()

protected static serializeTagParameters(array<string|int, mixed> $arguments) : string
Parameters
$arguments : array<string|int, mixed>
Return values
string

        
On this page

Search results