TextViewHelper extends AbstractViewHelper
This class is the implementation of a Fluid ViewHelper.
View this class in the TYPO3 ViewHelper reference: <f:render.text>
ViewHelper to render content based on records and fields from a TCA schema.
Handles the processing of both simple and rich text fields.
Can also handle extbase models, you still need to provide the field name, not the property name.
<f:render.text record="{page}" field="bodytext" />
{record -> f:render.text(field: 'title')}
<f:render.text field="subheader">{record}</f:render.text>
Table of Contents
Properties
- $escapeChildren : mixed
- We need to disable escaping for the children, otherwise extbase models are given as string to the viewHelper.
- $escapeOutput : mixed
Methods
- __construct() : mixed
- getContentArgumentName() : string
- initializeArguments() : void
- render() : UnsafeHTML
- validateAdditionalArguments() : void
Properties
$escapeChildren
We need to disable escaping for the children, otherwise extbase models are given as string to the viewHelper.
protected
mixed
$escapeChildren
= false
AbstractDomainObject has a __toString method, fluid executes it before giving use the object. This is a deeper issue in Fluid that we cannot easily resolve. This ViewHelper escapes the output itself, so we can safely disable escaping for the children and output.
$escapeOutput
protected
mixed
$escapeOutput
= false
Methods
__construct()
public
__construct(TcaSchemaFactory $tcaSchema, RecordFactory $recordFactory, DataMapFactory $dataMapFactory) : mixed
Parameters
- $tcaSchema : TcaSchemaFactory
- $recordFactory : RecordFactory
- $dataMapFactory : DataMapFactory
getContentArgumentName()
public
getContentArgumentName() : string
Return values
stringinitializeArguments()
public
initializeArguments() : void
render()
public
render() : UnsafeHTML
Return values
UnsafeHTMLvalidateAdditionalArguments()
public
validateAdditionalArguments(array<string|int, mixed> $arguments) : void
Parameters
- $arguments : array<string|int, mixed>