ViewFactoryData

final readonly class \TYPO3\CMS\Core\View\ViewFactoryData

A data object hand over to ViewFactoryInterface to create, configure and return a view based on this data.

Best practices:

  • Hand over request if possible.
  • Use the tuple $templateRootPaths, $partialRootPaths and $layoutRootPaths if possible, using an array of "base" paths like 'EXT:Resources/Private/(Templates|Partials|Layouts)'
  • Avoid $templatePathAndFilename
  • Call render('path/within/templateRootPath') without file-ending on the returned ViewInterface instance.

Table of Contents

Properties

$format  : string|null
$layoutRootPaths  : array|null
$partialRootPaths  : array|null
$request  : ServerRequestInterface|null
$templatePathAndFilename  : string|null
$templateRootPaths  : array|null

Methods

__construct()  : mixed

Properties

$layoutRootPaths

public array|null $layoutRootPaths = null

$partialRootPaths

public array|null $partialRootPaths = null

$request

public ServerRequestInterface|null $request = null

$templatePathAndFilename

public string|null $templatePathAndFilename = null

$templateRootPaths

public array|null $templateRootPaths = null

Methods

__construct()

public __construct([array|null $templateRootPaths = null ][, array|null $partialRootPaths = null ][, array|null $layoutRootPaths = null ][, string|null $templatePathAndFilename = null ][, ServerRequestInterface|null $request = null ][, string|null $format = null ]) : mixed

Parameters

$templateRootPaths : array|null = null
$partialRootPaths : array|null = null
$layoutRootPaths : array|null = null
$templatePathAndFilename : string|null = null
$request : ServerRequestInterface|null = null
$format : string|null = null
On this page