PrototypeConfiguration

final readonly class \TYPO3\CMS\Form\Domain\DTO\FormConfiguration\Prototype\PrototypeConfiguration

Uses
RawConfigurationTrait

Typed representation of a single prototype within the "prototypes" section of the form YAML configuration (e.g. "prototypes.standard").

This is an "open" DTO: a prototype is fully extensible by third-party extensions (custom form element types, finishers, validators, rendering options, …). Only the well-known core sub-trees are exposed as typed accessors; everything else stays reachable through RawConfigurationTrait::getRaw() / ::get().

Table of Contents

Properties

$finishers  : FinisherDefinitionCollection
$formEditor  : FormEditorConfiguration
$formElements  : FormElementDefinitionCollection
$formEngine  : FormEngineDefinition|null
$raw  : array
$validators  : ValidatorDefinitionCollection

Methods

__construct()  : mixed
fromArray()  : self
Create the DTO from the raw prototype configuration array.
get()  : mixed
Read a value from the raw configuration using a dot-separated path.
getFinisherPropertyCollections()  : PropertyCollectionDefinitionCollection
Finisher inspector editors, configured on the root "Form" element.
getFormEditorDefinitions()  : array<string, array<int|string, mixed>>
Reduce the definition registries to their form editor configuration.
getRaw()  : array<string, mixed>
Return the complete raw configuration array this DTO was built from.
has()  : bool
Check whether the given dot-separated path exists in the raw configuration.

Properties

Methods

__construct()

public __construct(array<string, mixed> $raw, FormEditorConfiguration $formEditor, FormElementDefinitionCollection $formElements, FinisherDefinitionCollection $finishers, ValidatorDefinitionCollection $validators, FormEngineDefinition|null $formEngine) : mixed

Parameters

$raw : array<string, mixed>

The complete, untouched prototype configuration array

$formEditor : FormEditorConfiguration

Typed "formEditor" sub configuration

$formElements : FormElementDefinitionCollection

Typed form element registry

$finishers : FinisherDefinitionCollection

Typed finisher registry

$validators : ValidatorDefinitionCollection

Typed validator registry

$formEngine : FormEngineDefinition|null

Typed prototype-level FormEngine configuration

fromArray()

Create the DTO from the raw prototype configuration array.

public static fromArray(array<string, mixed> $configuration) : self

Parameters

$configuration : array<string, mixed>

Return values

self

get()

Read a value from the raw configuration using a dot-separated path.

public get(string $path[, mixed $default = null ]) : mixed

Example: $dto->get('formEditor.dynamicJavaScriptModules.app').

Parameters

$path : string
$default : mixed = null

getFormEditorDefinitions()

Reduce the definition registries to their form editor configuration.

public getFormEditorDefinitions() : array<string, array<int|string, mixed>>

Return values

array<string, array<int|string, mixed>>

getRaw()

Return the complete raw configuration array this DTO was built from.

public getRaw() : array<string, mixed>

Use this to reach custom keys that are not (yet) mapped to typed properties, e.g. properties registered by third-party extensions.

Return values

array<string, mixed>

has()

Check whether the given dot-separated path exists in the raw configuration.

public has(string $path) : bool

Parameters

$path : string

Return values

bool
On this page