‪TYPO3CMS  10.4
TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare:
TYPO3\CMS\Backend\Form\FormDataProviderInterface

Public Member Functions

array addData (array $result)
 

Protected Member Functions

array initializeDataStructure (array $result, $fieldName)
 
array initializeDataValues (array $result, $fieldName)
 
array removeTceFormsArrayKeyFromDataStructureElements (array $result, $fieldName)
 
array removeElementTceFormsRecursive (array $structure)
 
array migrateFlexformTcaDataStructureElements (array $result, $fieldName)
 
array migrateFlexformTcaRecursive ($structure, $table, $fieldName)
 

Detailed Description

Resolve flex data structure and data values, prepare and normalize.

This is the first data provider in the chain of flex form related providers.

Definition at line 34 of file TcaFlexPrepare.php.

Member Function Documentation

◆ addData()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare::addData ( array  $result)

◆ initializeDataStructure()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare::initializeDataStructure ( array  $result,
  $fieldName 
)
protected

Fetch / initialize data structure.

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
array$result‪Result array
string$fieldName‪Currently handled field name
Returns
‪array Modified result
Exceptions

Definition at line 71 of file TcaFlexPrepare.php.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare\addData().

◆ initializeDataValues()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare::initializeDataValues ( array  $result,
  $fieldName 
)
protected

Parse / initialize value from xml string to array

Parameters
array$result‪Result array
string$fieldName‪Currently handled field name
Returns
‪array Modified result

Definition at line 113 of file TcaFlexPrepare.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\xml2array().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare\addData().

◆ migrateFlexformTcaDataStructureElements()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare::migrateFlexformTcaDataStructureElements ( array  $result,
  $fieldName 
)
protected

On-the-fly migration for flex form "TCA"

Parameters
array$result‪Result array
string$fieldName‪Currently handled field name
Returns
‪array Modified result

Definition at line 197 of file TcaFlexPrepare.php.

References TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare\migrateFlexformTcaRecursive().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare\addData().

◆ migrateFlexformTcaRecursive()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare::migrateFlexformTcaRecursive (   $structure,
  $table,
  $fieldName 
)
protected

Recursively migrate flex form TCA

Parameters
array$structure‪Given hierarchy
string$table
string$fieldName
Returns
‪array Modified hierarchy

Definition at line 213 of file TcaFlexPrepare.php.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare\migrateFlexformTcaDataStructureElements().

◆ removeElementTceFormsRecursive()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare::removeElementTceFormsRecursive ( array  $structure)
protected

Moves ['el']['something']['TCEforms'] to ['el']['something'] and ['ROOT']['TCEforms'] to ['ROOT'] recursive

Parameters
array$structure‪Given hierarchy
Returns
‪array Modified hierarchy

Definition at line 163 of file TcaFlexPrepare.php.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare\removeTceFormsArrayKeyFromDataStructureElements().

◆ removeTceFormsArrayKeyFromDataStructureElements()

array TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare::removeTceFormsArrayKeyFromDataStructureElements ( array  $result,
  $fieldName 
)
protected

Remove "TCEforms" key from all elements in data structure to simplify further parsing.

Example config: ['config']['ds']['sheets']['sDEF']['ROOT']['el']['anElement']['TCEforms']['label'] becomes ['config']['ds']['sheets']['sDEF']['ROOT']['el']['anElement']['label']

Parameters
array$result‪Result array
string$fieldName‪Currently handled field name
Returns
‪array Modified result

Definition at line 149 of file TcaFlexPrepare.php.

References TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare\removeElementTceFormsRecursive().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexPrepare\addData().