FormDataCompiler
Create and return a defined array of data ready to be used by the container / element render part of FormEngine
Table of Contents
Properties
- $formDataGroup : FormDataGroupInterface
- Data group that provides data
- $removeKeysFromFinalResultArray : array<string|int, mixed>
- List of top level array elements to be unset from result array before final result is returned.
Methods
- __construct() : mixed
- Get form data group injected
- compile() : array<string|int, mixed>
- Main entry method maps given data input array and sanitizes some crucial input parameters and calls compile on FormDataGroupInterface.
- initializeResultArray() : array<string|int, mixed>
Properties
$formDataGroup
Data group that provides data
protected
FormDataGroupInterface
$formDataGroup
$removeKeysFromFinalResultArray
List of top level array elements to be unset from result array before final result is returned.
protected
array<string|int, mixed>
$removeKeysFromFinalResultArray
= []
Methods
__construct()
Get form data group injected
public
__construct(FormDataGroupInterface $formDataGroup) : mixed
Parameters
- $formDataGroup : FormDataGroupInterface
compile()
Main entry method maps given data input array and sanitizes some crucial input parameters and calls compile on FormDataGroupInterface.
public
compile(array<string|int, mixed> $initialData) : array<string|int, mixed>
Parameters
- $initialData : array<string|int, mixed>
-
Initial set of data to map into result array
Tags
Return values
array<string|int, mixed> —Result with data
initializeResultArray()
protected
initializeResultArray() : array<string|int, mixed>