DataStructureIdentifierListener
Event listener extending the flex form handling for tt_content form elements (CType: form_formframework):
- Adds existing forms to flex form drop down list
- Adds finisher settings if Option "Override finisher settings" is active
Scope: backend
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Properties
- $configurationService : ConfigurationService
- $extbaseConfigurationManager : ConfigurationManagerInterface
- $extFormConfigurationManager : ConfigurationManagerInterface
- $flashMessageService : FlashMessageService
- $formPersistenceManager : FormPersistenceManagerInterface
- $translationService : TranslationService
Methods
- __construct() : mixed
- Some dependencies are declared lazy since they otherwise collide with early instance creations of FE PageRepository when called in sitations where DB does not yet exist (especially acceptance test setup)
- modifyDataStructure() : void
- Adds the list of existing form definitions to the form selection drop down and adds sheets to override finisher settings if requested.
- modifyDataStructureIdentifier() : void
- 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.
- addInvalidFrameworkConfigurationFlashMessage() : void
- addSelectedPersistenceIdentifier() : array
- buildFlexformSheetIdentifier() : string
- getAdditionalFinisherSheets() : array
- Returns additional flexform sheets with finisher fields
- getLanguageService() : LanguageService
- initializeNewSheetArray() : array
- Boilerplate XML array of a new sheet.
- translateFinisherDefinitionByIdentifier() : array
Properties
$configurationService
protected
ConfigurationService
$configurationService
Attributes
- #[Autowire]
- $lazy: true
$extbaseConfigurationManager
protected
ConfigurationManagerInterface
$extbaseConfigurationManager
Attributes
- #[Autowire]
- $lazy: true
$extFormConfigurationManager
protected
ConfigurationManagerInterface
$extFormConfigurationManager
Attributes
- #[Autowire]
- $lazy: ExtFormConfigurationManagerInterface::class
$flashMessageService
protected
FlashMessageService
$flashMessageService
$formPersistenceManager
protected
FormPersistenceManagerInterface
$formPersistenceManager
$translationService
protected
TranslationService
$translationService
Attributes
- #[Autowire]
- $lazy: true
Methods
__construct()
Some dependencies are declared lazy since they otherwise collide with early instance creations of FE PageRepository when called in sitations where DB does not yet exist (especially acceptance test setup)
public
__construct(FormPersistenceManagerInterface $formPersistenceManager, ConfigurationService $configurationService, TranslationService $translationService, FlashMessageService $flashMessageService, ConfigurationManagerInterface $extbaseConfigurationManager, ConfigurationManagerInterface $extFormConfigurationManager) : mixed
Parameters
- $formPersistenceManager : FormPersistenceManagerInterface
- $configurationService : ConfigurationService
- $translationService : TranslationService
- $flashMessageService : FlashMessageService
- $extbaseConfigurationManager : ConfigurationManagerInterface
- $extFormConfigurationManager : ConfigurationManagerInterface
Tags
modifyDataStructure()
Adds the list of existing form definitions to the form selection drop down and adds sheets to override finisher settings if requested.
public
modifyDataStructure(AfterFlexFormDataStructureParsedEvent $event) : void
Parameters
Attributes
- #[AsEventListener]
- 'form-framework/modify-data-structure'
modifyDataStructureIdentifier()
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.
public
modifyDataStructureIdentifier(AfterFlexFormDataStructureIdentifierInitializedEvent $event) : void
Parameters
Attributes
- #[AsEventListener]
- 'form-framework/modify-data-structure-identifier'
addInvalidFrameworkConfigurationFlashMessage()
protected
addInvalidFrameworkConfigurationFlashMessage(Exception $e[, string $identifier = '' ]) : void
Parameters
- $e : Exception
- $identifier : string = ''
addSelectedPersistenceIdentifier()
protected
addSelectedPersistenceIdentifier(string $persistenceIdentifier, array $dataStructure) : array
Parameters
- $persistenceIdentifier : string
- $dataStructure : array
Return values
arraybuildFlexformSheetIdentifier()
protected
buildFlexformSheetIdentifier(string $persistenceIdentifier, string $prototypeName, string $formIdentifier, string $finisherIdentifier) : string
Parameters
- $persistenceIdentifier : string
- $prototypeName : string
- $formIdentifier : string
- $finisherIdentifier : string
Return values
stringgetAdditionalFinisherSheets()
Returns additional flexform sheets with finisher fields
protected
getAdditionalFinisherSheets(string $persistenceIdentifier, array $formDefinition, string $prototypeName, array $prototypeConfiguration) : array
Parameters
- $persistenceIdentifier : string
-
Current persistence identifier
- $formDefinition : array
-
The form definition
- $prototypeName : string
- $prototypeConfiguration : array
Return values
arraygetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServiceinitializeNewSheetArray()
Boilerplate XML array of a new sheet.
protected
initializeNewSheetArray(string $sheetIdentifier, string $finisherName) : array
Parameters
- $sheetIdentifier : string
- $finisherName : string
Return values
arraytranslateFinisherDefinitionByIdentifier()
protected
translateFinisherDefinitionByIdentifier(string $finisherIdentifier, array $finishersDefinition, array $prototypeConfiguration) : array
Parameters
- $finisherIdentifier : string
- $finishersDefinition : array
- $prototypeConfiguration : array