TcaFlexPrepare
class \
- Implements
- FormDataProviderInterface
Resolve flex data structure and data values, prepare and normalize.
This is the first data provider in the chain of flex form related providers.
Table of Contents
Interfaces
- FormDataProviderInterface
- Interface must be implemented by form data provider classes.
Methods
- addData() : array
- Resolve flex data structures and prepare flex data values.
- initializeDataStructure() : array
- Fetch / initialize data structure.
- initializeDataValues() : array
- Parse / initialize value from xml string to array
- migrateFlexformTcaDataStructureElements() : array
- On-the-fly migration for flex form "TCA"
- migrateFlexformTcaRecursive() : array
- Recursively migrate flex form TCA
- removeElementTceFormsRecursive() : array
- Moves ['el']['something']['TCEforms'] to ['el']['something'] and ['ROOT']['TCEforms'] to ['ROOT'] recursive
- removeTceFormsArrayKeyFromDataStructureElements() : array
- Remove "TCEforms" key from all elements in data structure to simplify further parsing.
Methods
addData()
Resolve flex data structures and prepare flex data values.
public
addData(array $result) : array
Normalize some details to have aligned array nesting for the rest of the processing method and the render engine.
Parameters
- $result : array
Return values
arrayinitializeDataStructure()
Fetch / initialize data structure.
protected
initializeDataStructure(array $result, string $fieldName) : array
The sub array with different possible data structures in ['config']['ds'] is resolved here, ds array contains only the one resolved data structure after this method.
Parameters
- $result : array
-
Result array
- $fieldName : string
-
Currently handled field name
Tags
Return values
array —Modified result
initializeDataValues()
Parse / initialize value from xml string to array
protected
initializeDataValues(array $result, string $fieldName) : array
Parameters
- $result : array
-
Result array
- $fieldName : string
-
Currently handled field name
Return values
array —Modified result
migrateFlexformTcaDataStructureElements()
On-the-fly migration for flex form "TCA"
protected
migrateFlexformTcaDataStructureElements(array $result, string $fieldName) : array
Parameters
- $result : array
-
Result array
- $fieldName : string
-
Currently handled field name
Return values
array —Modified result
migrateFlexformTcaRecursive()
Recursively migrate flex form TCA
protected
migrateFlexformTcaRecursive(array $structure, string $table, string $fieldName) : array
Parameters
- $structure : array
-
Given hierarchy
- $table : string
- $fieldName : string
Return values
array —Modified hierarchy
removeElementTceFormsRecursive()
Moves ['el']['something']['TCEforms'] to ['el']['something'] and ['ROOT']['TCEforms'] to ['ROOT'] recursive
protected
removeElementTceFormsRecursive(array $structure) : array
Parameters
- $structure : array
-
Given hierarchy
Return values
array —Modified hierarchy
removeTceFormsArrayKeyFromDataStructureElements()
Remove "TCEforms" key from all elements in data structure to simplify further parsing.
protected
removeTceFormsArrayKeyFromDataStructureElements(array $result, string $fieldName) : array
Example config: ['config']['ds']['sheets']['sDEF']['ROOT']['el']['anElement']['TCEforms']['label'] becomes ['config']['ds']['sheets']['sDEF']['ROOT']['el']['anElement']['label']
Parameters
- $result : array
-
Result array
- $fieldName : string
-
Currently handled field name
Return values
array —Modified result