ViewInterface

interface \TYPO3\CMS\Core\View\ViewInterface

A generic view interface.

Table of Contents

Methods

assign()  : self
Add a variable to the view data collection.
assignMultiple()  : self
Add multiple variables to the view data collection.
render()  : string
Renders the view. Optionally receives a template location.

Methods

assign()

Add a variable to the view data collection.

public assign(string $key, mixed $value) : self

Parameters

$key : string
$value : mixed

Return values

self

assignMultiple()

Add multiple variables to the view data collection.

public assignMultiple(array<string, mixed> $values) : self

Parameters

$values : array<string, mixed>

Array of string keys with mixed-type values.

Return values

self

render()

Renders the view. Optionally receives a template location.

public render([string $templateFileName = '' ]) : string

Parameters

$templateFileName : string = ''

Return values

string
On this page