‪TYPO3CMS  10.4
TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook Class Reference

Public Member Functions

array getDataStructureIdentifierPostProcess (array $fieldTca, string $tableName, string $fieldName, array $row, array $identifier)
 
array parseDataStructureByIdentifierPostProcess (array $dataStructure, array $identifier)
 

Public Attributes

const L10N_PREFIX = 'LLL:EXT:form/Resources/Private/Language/Database.xlf:'
 

Protected Member Functions

array getAdditionalFinisherSheets (string $persistenceIdentifier, array $formDefinition)
 
array initializeNewSheetArray (string $sheetIdentifier, string $finisherName)
 
array addSelectedPersistenceIdentifier (string $persistenceIdentifier, array $dataStructure)
 
 addInvalidFrameworkConfigurationFlashMessage (\Exception $e)
 
string buildFlexformSheetIdentifier (string $persistenceIdentifier, string $prototypeName, string $formIdentifier, string $finisherIdentifier)
 
array translateFinisherDefinitionByIdentifier (string $finisherIdentifier, array $finishersDefinition, array $prototypeConfiguration)
 
LanguageService getLanguageService ()
 

Detailed Description

Hooks into flex form handling of backend for tt_content form elements:

  • ‪Adds existing forms to flex form drop down list
  • ‪Adds finisher settings if "override finishers" is active

Scope: backend

Definition at line 46 of file DataStructureIdentifierHook.php.

Member Function Documentation

◆ addInvalidFrameworkConfigurationFlashMessage()

TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::addInvalidFrameworkConfigurationFlashMessage ( \Exception  $e)
protected

◆ addSelectedPersistenceIdentifier()

array TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::addSelectedPersistenceIdentifier ( string  $persistenceIdentifier,
array  $dataStructure 
)
protected
Parameters
string$persistenceIdentifier
array$dataStructure
Returns
‪array

Definition at line 310 of file DataStructureIdentifierHook.php.

References TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook\getLanguageService().

Referenced by TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook\parseDataStructureByIdentifierPostProcess().

◆ buildFlexformSheetIdentifier()

string TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::buildFlexformSheetIdentifier ( string  $persistenceIdentifier,
string  $prototypeName,
string  $formIdentifier,
string  $finisherIdentifier 
)
protected
Parameters
string$persistenceIdentifier
string$prototypeName
string$formIdentifier
string$finisherIdentifier
Returns
‪string

Definition at line 355 of file DataStructureIdentifierHook.php.

Referenced by TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook\getAdditionalFinisherSheets().

◆ getAdditionalFinisherSheets()

array TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::getAdditionalFinisherSheets ( string  $persistenceIdentifier,
array  $formDefinition 
)
protected

◆ getDataStructureIdentifierPostProcess()

array TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::getDataStructureIdentifierPostProcess ( array  $fieldTca,
string  $tableName,
string  $fieldName,
array  $row,
array  $identifier 
)

The data structure depends on a current form selection (persistenceIdentifier) and if the field "overrideFinishers" is active. Add both to the identifier to hand these information over to parseDataStructureByIdentifierPostProcess() hook.

Parameters
array$fieldTca‪Incoming field TCA
string$tableName‪Handled table
string$fieldName‪Handled field
array$row‪Current data row
array$identifier‪Already calculated identifier
Returns
‪array Modified identifier

Definition at line 66 of file DataStructureIdentifierHook.php.

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

◆ getLanguageService()

◆ initializeNewSheetArray()

array TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::initializeNewSheetArray ( string  $sheetIdentifier,
string  $finisherName 
)
protected

Boilerplate XML array of a new sheet

Parameters
string$sheetIdentifier
string$finisherName
Exceptions

Definition at line 283 of file DataStructureIdentifierHook.php.

Referenced by TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook\getAdditionalFinisherSheets().

◆ parseDataStructureByIdentifierPostProcess()

array TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::parseDataStructureByIdentifierPostProcess ( array  $dataStructure,
array  $identifier 
)

Returns a modified flexform data array.

This adds the list of existing form definitions to the form selection drop down and adds sheets to override finisher settings if requested.

Parameters
array$dataStructure
array$identifier
Returns
‪array

Definition at line 107 of file DataStructureIdentifierHook.php.

References TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook\addInvalidFrameworkConfigurationFlashMessage(), TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook\addSelectedPersistenceIdentifier(), TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook\getAdditionalFinisherSheets(), TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook\getLanguageService(), and TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule().

◆ translateFinisherDefinitionByIdentifier()

array TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::translateFinisherDefinitionByIdentifier ( string  $finisherIdentifier,
array  $finishersDefinition,
array  $prototypeConfiguration 
)
protected
Parameters
string$finisherIdentifier
array$finishersDefinition
array$prototypeConfiguration
Returns
‪array

Definition at line 377 of file DataStructureIdentifierHook.php.

References TYPO3\CMS\Form\Service\TranslationService\getInstance(), and TYPO3\CMS\Form\Service\TranslationService\translateValuesRecursive().

Referenced by TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook\getAdditionalFinisherSheets().

Member Data Documentation

◆ L10N_PREFIX

const TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::L10N_PREFIX = 'LLL:EXT:form/Resources/Private/Language/Database.xlf:'

Localisation prefix

Definition at line 52 of file DataStructureIdentifierHook.php.