FormEditorConfiguration uses ConfigurationValueNormalizationTrait, RawConfigurationTrait

Read onlyYes
FinalYes

Typed representation of the "prototypes.<name>.formEditor" section of the form YAML configuration.

This is an "open" DTO: the form editor setup is extensible by third-party extensions (custom inspector editors, partials, dynamic modules, …). Only the well-known core keys are exposed as typed properties; everything else stays reachable through RawConfigurationTrait::getRaw() / ::get().

Internal

Table of Contents

Properties

$addInlineSettings  : array<string|int, mixed>
$dynamicJavaScriptModules  : array<string|int, mixed>
$formEditorFluidConfiguration  : array<string|int, mixed>|null
$formEditorPartials  : array<string|int, mixed>|null
$formElementGroups  : array<string|int, mixed>
$maximumUndoSteps  : int
$raw  : array<string|int, mixed>
$stylesheets  : array<string|int, mixed>
$translationFiles  : array<string|int, mixed>

Methods

__construct()  : mixed
fromArray()  : self
Create the DTO from the raw "formEditor" configuration array.
get()  : mixed
Read a value from the raw configuration using a dot-separated path.
getAdditionalViewModelModules()  : array<int, string>
Return the additional view model JavaScript modules registered by the prototype (loaded in addition to the default view model).
getJavaScriptModulesForRoles()  : array<string, string>
Return the dynamic JavaScript modules reduced to the given role keys (e.g. "app", "mediator", "viewModel"), preserving the role => module map.
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

$addInlineSettings

public array<string|int, mixed> $addInlineSettings = []

$dynamicJavaScriptModules

public array<string|int, mixed> $dynamicJavaScriptModules = []

$formEditorFluidConfiguration

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

$formEditorPartials

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

$formElementGroups

public array<string|int, mixed> $formElementGroups = []

$maximumUndoSteps

public int $maximumUndoSteps = 0

$raw

public array<string|int, mixed> $raw = []

$stylesheets

public array<string|int, mixed> $stylesheets = []

$translationFiles

public array<string|int, mixed> $translationFiles = []

Methods

__construct()

public __construct([array<string, mixed> $raw = [] ][, int $maximumUndoSteps = 0 ][, array<int, string> $stylesheets = [] ][, array<int, string> $translationFiles = [] ][, array<string, mixed> $addInlineSettings = [] ][, array<string, mixed> $dynamicJavaScriptModules = [] ][, array<string, mixed> $formElementGroups = [] ][, array<string, mixed>|null $formEditorFluidConfiguration = null ][, array<string, mixed>|null $formEditorPartials = null ]) : mixed
Parameters
$raw : array<string, mixed> = []

The complete, untouched "formEditor" configuration array

$maximumUndoSteps : int = 0

Number of undo steps the form editor keeps in history

$stylesheets : array<int, string> = []

Stylesheets loaded in the form editor module

$translationFiles : array<int, string> = []

Translation files keyed by priority

$addInlineSettings : array<string, mixed> = []

Inline settings merged into the page renderer

$dynamicJavaScriptModules : array<string, mixed> = []

JavaScript modules keyed by role (e.g. "app", "viewModel", "additionalViewModelModules")

$formElementGroups : array<string, mixed> = []

Form element groups shown in the "insert element" panel

$formEditorFluidConfiguration : array<string, mixed>|null = null

Fluid paths used to render the inline editor templates

$formEditorPartials : array<string, mixed>|null = null

Mapping of inspector editor identifiers to Fluid partial names

fromArray()

Create the DTO from the raw "formEditor" 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

getAdditionalViewModelModules()

Return the additional view model JavaScript modules registered by the prototype (loaded in addition to the default view model).

public getAdditionalViewModelModules() : array<int, string>
Return values
array<int, string>

getJavaScriptModulesForRoles()

Return the dynamic JavaScript modules reduced to the given role keys (e.g. "app", "mediator", "viewModel"), preserving the role => module map.

public getJavaScriptModulesForRoles(array<int, string> $roleKeys) : array<string, string>
Parameters
$roleKeys : array<int, string>
Return values
array<string, string>

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

Search results