FormFactoryInterface

A Form Factory is responsible for building a {@link TYPO3\CMS\Form\Domain\Model\FormDefinition}.

Instead of implementing this interface, subclassing is more appropriate in most cases.

A Form Factory can be called anytime a FormDefinition should be built; in most cases it is done through an invocation of a Form Rendering ViewHelper.

Scope: frontend / backend

Table of Contents

Methods

build()  : FormDefinition
Build a form definition, depending on some configuration.

Methods

build()

Build a form definition, depending on some configuration.

public build(array<string|int, mixed> $configuration[, string $prototypeName = null ][, ServerRequestInterface $request = null ]) : FormDefinition

The configuration array is factory-specific; for example a YAML or JSON factory could retrieve the path to the YAML / JSON file via the configuration array.

Parameters
$configuration : array<string|int, mixed>

factory-specific configuration array

$prototypeName : string = null

The name of the "PrototypeName" to use; it is factory-specific to implement this.

$request : ServerRequestInterface = null

The PSR-7 request object

Return values
FormDefinition

a newly built form definition


        
On this page

Search results