‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Configuration\Event\AfterFlexFormDataStructureIdentifierInitializedEvent Class Reference

Public Member Functions

 __construct (private readonly array $fieldTca, private readonly string $tableName, private readonly string $fieldName, private readonly array $row, private array $identifier,)
 getFieldTca ()
 getTableName ()
 getFieldName ()
 getRow ()
 setIdentifier (array $identifier)
 getIdentifier ()

Detailed Description

Listeners to this event are able to modify or enhance the data structure identifier, which is used for a given TCA flex field.

This event can be used to add additional data to an identifier. Be careful here, especially if stuff from the source record like uid or pid is added! This may easily lead to issues with data handler details like copy or move records, localization and version overlays. Test this very well! Multiple listeners may add information to the same identifier here - take care to namespace array keys. Information added here can be later used in the data structure related PSR-14 Events (BeforeFlexFormDataStructureParsedEvent and AfterFlexFormDataStructureParsedEvent) again.

See the note on FlexFormTools regarding the schema of $dataStructure.

Definition at line 34 of file AfterFlexFormDataStructureIdentifierInitializedEvent.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Configuration\Event\AfterFlexFormDataStructureIdentifierInitializedEvent::__construct ( private readonly array  $fieldTca,
private readonly string  $tableName,
private readonly string  $fieldName,
private readonly array  $row,
private array  $identifier 
array$fieldTca‪Full TCA of the field in question that has type=flex set
string$tableName‪The table name of the TCA field
string$fieldName‪The field name
array$row‪The data row
array$identifier‪The data structure identifier (set by event listener of the default)

Definition at line 43 of file AfterFlexFormDataStructureIdentifierInitializedEvent.php.

Member Function Documentation

◆ getFieldName()

TYPO3\CMS\Core\Configuration\Event\AfterFlexFormDataStructureIdentifierInitializedEvent::getFieldName ( )

◆ getFieldTca()

TYPO3\CMS\Core\Configuration\Event\AfterFlexFormDataStructureIdentifierInitializedEvent::getFieldTca ( )

Returns the full TCA of the currently handled field, having type=flex set.

Definition at line 55 of file AfterFlexFormDataStructureIdentifierInitializedEvent.php.

◆ getIdentifier()

TYPO3\CMS\Core\Configuration\Event\AfterFlexFormDataStructureIdentifierInitializedEvent::getIdentifier ( )

Returns the initialized data structure identifier, which has either been defined by an event listener or set to the default by the FlexFormTools component.

Definition at line 92 of file AfterFlexFormDataStructureIdentifierInitializedEvent.php.

References TYPO3\CMS\Webhooks\Message\$identifier.

Referenced by TYPO3\CMS\Core\Tests\Functional\Configuration\FlexForm\FlexFormToolsTest\getDataStructureIdentifierWithModifyListenerCallsListener(), and TYPO3\CMS\Form\EventListener\DataStructureIdentifierListener\modifyDataStructureIdentifier().

◆ getRow()

TYPO3\CMS\Core\Configuration\Event\AfterFlexFormDataStructureIdentifierInitializedEvent::getRow ( )

Returns the whole database row of the current record.

Definition at line 73 of file AfterFlexFormDataStructureIdentifierInitializedEvent.php.

Referenced by TYPO3\CMS\Form\EventListener\DataStructureIdentifierListener\modifyDataStructureIdentifier().

◆ getTableName()

TYPO3\CMS\Core\Configuration\Event\AfterFlexFormDataStructureIdentifierInitializedEvent::getTableName ( )

◆ setIdentifier()

TYPO3\CMS\Core\Configuration\Event\AfterFlexFormDataStructureIdentifierInitializedEvent::setIdentifier ( array  $identifier)