TypolinkViewHelper extends AbstractViewHelper uses CompileWithRenderStatic
This class is the implementation of a Fluid ViewHelper.
View this class in the TYPO3 ViewHelper reference: <f:link.typolink>
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::
LinktextDepending on current page, routing and page path configuration.
TextWrap usage
::
<f:link.typolink parameter="123" textWrap="|"/>
Output::
Page title of some page wrapped in spanDepending 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::
LinktextDepending on routing and page path configuration.
Table of Contents
Properties
- $escapeOutput : bool
Methods
- initializeArguments() : mixed
- Initialize ViewHelper arguments
- renderStatic() : mixed|string
- Render
- invokeContentObjectRenderer() : string
- mergeTypoLinkConfiguration() : array<string|int, mixed>
- Merges view helper arguments with typolink parts.
- serializeTagParameters() : string
Properties
$escapeOutput
protected
bool
$escapeOutput
= false
Methods
initializeArguments()
Initialize ViewHelper arguments
public
initializeArguments() : mixed
Tags
renderStatic()
Render
public
static renderStatic(array<string|int, mixed> $arguments, Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) : mixed|string
Parameters
- $arguments : array<string|int, mixed>
- $renderChildrenClosure : Closure
- $renderingContext : RenderingContextInterface
Tags
Return values
mixed|stringinvokeContentObjectRenderer()
protected
static invokeContentObjectRenderer(array<string|int, mixed> $arguments, string $typoLinkParameter, string $content) : string
Parameters
- $arguments : array<string|int, mixed>
- $typoLinkParameter : string
- $content : string
Return values
stringmergeTypoLinkConfiguration()
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>