TextViewHelper

final class \TYPO3\CMS\Fluid\ViewHelpers\Render\TextViewHelper

Extends
AbstractViewHelper

ViewHelper to render content based on records and fields from a TCA schema.

Handles the processing of both simple and rich text fields. By default, accessing a missing field raises an error. Set optional to true to return null instead.

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>
  {record -> f:render.text(field: 'subheader', optional: true)}

Tags

see
https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-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|null
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

getContentArgumentName()

public getContentArgumentName() : string

Return values

string

initializeArguments()

public initializeArguments() : void

validateAdditionalArguments()

public validateAdditionalArguments(array $arguments) : void

Parameters

$arguments : array
On this page