TYPO3  7.6
Public Member Functions | Protected Member Functions | List of all members
TcaFlexFetch Class Reference
Inheritance diagram for TcaFlexFetch:
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 ( array  $result)

Resolve ds pointer stuff and parse both ds and dv

Parameters
array$result
Returns
array

Implements FormDataProviderInterface.

Definition at line 34 of file TcaFlexFetch.php.

References TcaFlexFetch\initializeDataStructure(), TcaFlexFetch\initializeDataValues(), and TcaFlexFetch\resolvePossibleExternalFileInDataStructure().

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
\UnexpectedValueException

Definition at line 59 of file TcaFlexFetch.php.

References BackendUtility\getFlexFormDS().

Referenced by TcaFlexFetch\addData().

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 GeneralUtility\xml2array().

Referenced by TcaFlexFetch\addData().

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 GeneralUtility\getFileAbsFileName(), GeneralUtility\getUrl(), and GeneralUtility\xml2array().

Referenced by TcaFlexFetch\addData().