FlexFormParsingModifyEventListener¶
This class registers event listeners to dynamically configure and modify FlexForm data structures for the TYPO3 extension dailyverses
.
Namespace: Theolangstraat\Dailyverses\Configuration\EventListener
Event Listeners¶
Event Identifier |
Method |
---|---|
|
|
|
|
|
|
|
|
|
|
Methods¶
setDataStructure¶
Triggered before the FlexForm data structure is parsed.
Checks if the
dataStructureKey
containsdailyverses_dailyverses
.Retrieves the site identifier using
SiteFinder
based on the storedpageId
.Assigns a site-specific XML file as the FlexForm structure:
FILE:EXT:dailyverses/Configuration/FlexForms/{siteIdentifier}.xml
.
modifyDataStructure¶
Triggered after the FlexForm data structure is parsed.
Currently unused.
Can be extended to dynamically modify FlexForm sheet titles or fields.
setDataStructureIdentifier¶
Triggered before the FlexForm identifier is initialized.
Determines the correct
pid
from the content element row.If
pid
is negative (temporary UID), queries thett_content
table to resolve the actualpid
.Stores
pageId
,languageUid
, andcontentType
inFlexFormContextStorage
for later use.
modifyDataStructureIdentifier¶
Triggered after the FlexForm identifier is initialized.
Currently unused.
setFlexForms¶
Triggered during package initialization.
Checks if the extension key is
dailyverses
.Uses the
GenerateFlexForm
service to create XML FlexForm files for each site.Iterates over all sites and generates FlexForms based on their language configuration.
Dependencies¶
TYPO3\CMS\Core\Site\SiteFinder
TYPO3\CMS\Core\Database\ConnectionPool
Theolangstraat\Dailyverses\Configuration\EventListener\FlexFormContextStorage
Theolangstraat\Dailyverses\Configuration\EventListener\GenerateFlexForm
Usage¶
This class enables dynamic assignment of FlexForm configurations for content elements of type dailyverses_dailyverses
. It ensures that each site can have its own tailored FlexForm structure.
Note
Make sure the XML files exist in EXT:dailyverses/Configuration/FlexForms/
. If not, they will be generated during package initialization.