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<string|int, mixed>
- buildFlexformSheetIdentifier() : string
- getAdditionalFinisherSheets() : array<string|int, mixed>
- Returns additional flexform sheets with finisher fields
- getLanguageService() : LanguageService
- initializeNewSheetArray() : array<string|int, mixed>
- Boilerplate XML array of a new sheet.
- translateFinisherDefinitionByIdentifier() : array<string|int, mixed>
Properties
$configurationService
protected
ConfigurationService
$configurationService
Attributes
- #[Autowire]
- $lazy: true
$extbaseConfigurationManager
protected
ConfigurationManagerInterface
$extbaseConfigurationManager
Attributes
- #[Autowire]
- $lazy: true
$extFormConfigurationManager
protected
ConfigurationManagerInterface
$extFormConfigurationManager
Attributes
- #[Autowire]
- $lazy: true
$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<string|int, mixed> $dataStructure) : array<string|int, mixed>
Parameters
- $persistenceIdentifier : string
- $dataStructure : array<string|int, mixed>
Return values
array<string|int, mixed>buildFlexformSheetIdentifier()
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<string|int, mixed> $formDefinition, string $prototypeName, array<string|int, mixed> $prototypeConfiguration) : array<string|int, mixed>
Parameters
- $persistenceIdentifier : string
-
Current persistence identifier
- $formDefinition : array<string|int, mixed>
-
The form definition
- $prototypeName : string
- $prototypeConfiguration : array<string|int, mixed>
Return values
array<string|int, mixed>getLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServiceinitializeNewSheetArray()
Boilerplate XML array of a new sheet.
protected
initializeNewSheetArray(string $sheetIdentifier, string $finisherName) : array<string|int, mixed>
Parameters
- $sheetIdentifier : string
- $finisherName : string
Return values
array<string|int, mixed>translateFinisherDefinitionByIdentifier()
protected
translateFinisherDefinitionByIdentifier(string $finisherIdentifier, array<string|int, mixed> $finishersDefinition, array<string|int, mixed> $prototypeConfiguration) : array<string|int, mixed>
Parameters
- $finisherIdentifier : string
- $finishersDefinition : array<string|int, mixed>
- $prototypeConfiguration : array<string|int, mixed>