ArrayFormFactory extends AbstractFormFactory
A factory that creates a FormDefinition from an array
Scope: frontend / backend
Attributes
- #[Autoconfigure]
- $public: true
- $shared: false
Table of Contents
Methods
- build() : FormDefinition
- Build a form definition, depending on some configuration.
- addNestedRenderable() : mixed
- Add form elements to the $parentRenderable
- triggerFormBuildingFinished() : mixed
- Helper to be called by every AbstractFormFactory after everything has been built to call the "afterBuildingFinished" hook on all form elements.
Methods
build()
Build a form definition, depending on some configuration.
public
build(array<string|int, mixed> $configuration[, string|null $prototypeName = null ][, ServerRequestInterface|null $request = null ]) : FormDefinition
Parameters
- $configuration : array<string|int, mixed>
-
factory-specific configuration array
- $prototypeName : string|null = null
-
The name of the "PrototypeName" to use; it is factory-specific to implement this.
- $request : ServerRequestInterface|null = null
-
The PSR-7 request object
Tags
Return values
FormDefinition —a newly built form definition
addNestedRenderable()
Add form elements to the $parentRenderable
protected
addNestedRenderable(array<string|int, mixed> $nestedRenderableConfiguration, CompositeRenderableInterface $parentRenderable[, ServerRequestInterface|null $request = null ]) : mixed
Parameters
- $nestedRenderableConfiguration : array<string|int, mixed>
- $parentRenderable : CompositeRenderableInterface
- $request : ServerRequestInterface|null = null
Tags
triggerFormBuildingFinished()
Helper to be called by every AbstractFormFactory after everything has been built to call the "afterBuildingFinished" hook on all form elements.
protected
triggerFormBuildingFinished(FormDefinition $form) : mixed
Parameters
- $form : FormDefinition