ViewFactoryData

Read onlyYes
FinalYes

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<string|int, mixed>|null
$partialRootPaths  : array<string|int, mixed>|null
$request  : ServerRequestInterface|null
$templatePathAndFilename  : string|null
$templateRootPaths  : array<string|int, mixed>|null

Methods

__construct()  : mixed

Properties

$layoutRootPaths

public array<string|int, mixed>|null $layoutRootPaths = null

$partialRootPaths

public array<string|int, mixed>|null $partialRootPaths = null

$request

public ServerRequestInterface|null $request = null

$templatePathAndFilename

public string|null $templatePathAndFilename = null

$templateRootPaths

public array<string|int, mixed>|null $templateRootPaths = null

Methods

__construct()

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

        
On this page

Search results