TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexFetch Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexFetch:
TYPO3\CMS\Backend\Form\FormDataProviderInterface

Public Member Functions

 addData (array $result)
 

Protected Member Functions

 initializeDataStructure (array $result, $fieldName)
 
 initializeDataValues (array $result, $fieldName)
 
 resolvePossibleExternalFileInDataStructure (array $result, $fieldName)
 

Detailed Description

Resolve and flex data structure and data values.

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

Definition at line 26 of file TcaFlexFetch.php.

Member Function Documentation

◆ addData()

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

◆ initializeDataStructure()

TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexFetch::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$resultResult array
string$fieldNameCurrently handled field name
Returns
array Modified result
Exceptions

Definition at line 59 of file TcaFlexFetch.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getFlexFormDS().

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

◆ initializeDataValues()

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

Parse / initialize value from xml string to array

Parameters
array$resultResult array
string$fieldNameCurrently handled field name
Returns
array Modified result

Definition at line 90 of file TcaFlexFetch.php.

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

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

◆ resolvePossibleExternalFileInDataStructure()

TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexFetch::resolvePossibleExternalFileInDataStructure ( array  $result,
  $fieldName 
)
protected

Single fields can be extracted to files again. This is resolved and parsed here.

Todo:

: Why is this not done in BackendUtility::getFlexFormDS() directly? If done there, the two methods

: GeneralUtility::resolveSheetDefInDS() and GeneralUtility::resolveAllSheetsInDS() could be killed

: since this resolving is basically the only really useful thing they actually do.

Parameters
array$resultResult array
string$fieldNameCurrent handle field name
Returns
array Modified item array

Definition at line 126 of file TcaFlexFetch.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\getFileAbsFileName(), TYPO3\CMS\Core\Utility\GeneralUtility\getUrl(), and TYPO3\CMS\Core\Utility\GeneralUtility\xml2array().

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