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

Public Member Functions

 addData (array $result)
 

Protected Member Functions

 getFlexIdentifier (array $result, $fieldName)
 
 getPageTsOfFlex (array $result, $fieldName, $flexIdentifier)
 
 modifyOuterDataStructure (array $result, $fieldName, $pageTsConfig)
 
 removeExcludeFieldsFromDataStructure (array $result, $fieldName, $flexIdentifier)
 
 removeDisabledFieldsFromDataStructure (array $result, $fieldName, $pageTsConfig)
 
 modifySingleSheetInformation (array $dataStructure, array $pageTsOfSheet)
 
 addDataStructurePointersToMetaData (array $result, $fieldName)
 
 getBackendUser ()
 

Detailed Description

Process data structures and data values, calculate defaults.

This is typically the last provider, executed after TcaFlexPrepare

Definition at line 28 of file TcaFlexProcess.php.

Member Function Documentation

◆ addData()

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

Determine possible pageTsConfig overrides and apply them to ds. Determine available languages and sanitize dv for further processing. Then kick and validate further details like excluded fields. Finally for each possible value and ds call FormDataCompiler with set FlexFormSegment group to resolve single field stuff like item processor functions.

Parameters
array$result
Returns
array

Implements TYPO3\CMS\Backend\Form\FormDataProviderInterface.

Definition at line 40 of file TcaFlexProcess.php.

References TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess\addDataStructurePointersToMetaData(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess\getFlexIdentifier(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess\getPageTsOfFlex(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess\modifyOuterDataStructure(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess\removeDisabledFieldsFromDataStructure(), and TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess\removeExcludeFieldsFromDataStructure().

◆ addDataStructurePointersToMetaData()

TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess::addDataStructurePointersToMetaData ( array  $result,
  $fieldName 
)
protected

Add fields and values used by ds_pointerField to the meta data array so they can be used in AJAX context during rendering.

Todo:
: This method is a stopgap measure to get required information into the AJAX controller
Parameters
array$resultResult array
string$fieldNameCurrent handle field name
Returns
array

Definition at line 585 of file TcaFlexProcess.php.

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

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

◆ getBackendUser()

TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess::getBackendUser ( )
protected
Returns
BackendUserAuthentication

Definition at line 610 of file TcaFlexProcess.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess\removeExcludeFieldsFromDataStructure().

◆ getFlexIdentifier()

TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess::getFlexIdentifier ( array  $result,
  $fieldName 
)
protected

Take care of ds_pointerField and friends to determine the correct sub array within TCA config ds.

Gets extension identifier. Use second pointer field if it's value is not empty, "list" or "*", else it must be a plugin and first one will be used. This code basically determines the sub key of ds field: config = array( ds => array( 'aFlexConfig' => '<flexXml ... ^^^^^^^^^^^ $flexformIdentifier contains "aFlexConfig" after this operation.

Todo:

: This method is only implemented half. It basically should do all the

: pointer handling that is done within BackendUtility::getFlexFormDS() to $srcPointer.

Parameters
array$resultResult array
string$fieldNameCurrent handle field name
Returns
string Pointer

Definition at line 79 of file TcaFlexProcess.php.

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

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

◆ getPageTsOfFlex()

TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess::getPageTsOfFlex ( array  $result,
  $fieldName,
  $flexIdentifier 
)
protected

Determine TCEFORM.aTable.aField.matchingIdentifier

Parameters
array$resultResult array
string$fieldNameHandled field name
string$flexIdentifierDetermined identifier
Returns
array PageTsConfig for this flex

Definition at line 109 of file TcaFlexProcess.php.

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

◆ modifyOuterDataStructure()

TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess::modifyOuterDataStructure ( array  $result,
  $fieldName,
  $pageTsConfig 
)
protected

Handle "outer" flex data structure changes like language and sheet description. Does not change "TCA" or values of single elements

Parameters
array$resultResult array
string$fieldNameCurrent handle field name
array$pageTsConfigGiven pageTsConfig of this flex form
Returns
array Modified item array

Definition at line 129 of file TcaFlexProcess.php.

References TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess\modifySingleSheetInformation().

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

◆ modifySingleSheetInformation()

TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess::modifySingleSheetInformation ( array  $dataStructure,
array  $pageTsOfSheet 
)
protected

Modify data structure of a single "sheet" Sets "secondary" data like sheet names and so on, but does NOT modify single elements

Parameters
array$dataStructureGiven data structure
array$pageTsOfSheetPage Ts config of given field
Returns
array Modified data structure

Definition at line 552 of file TcaFlexProcess.php.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess\modifyOuterDataStructure().

◆ removeDisabledFieldsFromDataStructure()

TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess::removeDisabledFieldsFromDataStructure ( array  $result,
  $fieldName,
  $pageTsConfig 
)
protected

Remove fields from data structure that are disabled in pageTsConfig.

Parameters
array$resultResult array
string$fieldNameCurrent handle field name
array$pageTsConfigGiven pageTsConfig of this flex form
Returns
array Modified item array

Definition at line 205 of file TcaFlexProcess.php.

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

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

◆ removeExcludeFieldsFromDataStructure()

TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess::removeExcludeFieldsFromDataStructure ( array  $result,
  $fieldName,
  $flexIdentifier 
)
protected

Removes fields from data structure the user has no access to

Parameters
array$resultResult array
string$fieldNameCurrent handle field name
string$flexIdentifierDetermined identifier
Returns
array Modified result

Definition at line 164 of file TcaFlexProcess.php.

References TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess\getBackendUser(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

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