AfterFlexFormDataStructureIdentifierInitializedEvent

FinalYes

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.

Table of Contents

Methods

__construct()  : mixed
getFieldName()  : string
getFieldTca()  : array<string|int, mixed>
Returns the full TCA of the currently handled field, having `type=flex` set.
getIdentifier()  : array<string|int, mixed>
Returns the initialized data structure identifier, which has either been defined by an event listener or set to the default by the `FlexFormTools` component.
getRow()  : array<string|int, mixed>
Returns the whole database row of the current record.
getTableName()  : string
setIdentifier()  : void
Allows to modify or completely replace the initialized data structure identifier.

Methods

__construct()

public __construct(array<string|int, mixed> $fieldTca, string $tableName, string $fieldName, array<string|int, mixed> $row, array<string|int, mixed> $identifier) : mixed
Parameters
$fieldTca : array<string|int, mixed>

Full TCA of the field in question that has type=flex set

$tableName : string

The table name of the TCA field

$fieldName : string

The field name

$row : array<string|int, mixed>

The data row

$identifier : array<string|int, mixed>

The data structure identifier (set by event listener of the default)

getFieldName()

public getFieldName() : string
Return values
string

getFieldTca()

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

public getFieldTca() : array<string|int, mixed>
Return values
array<string|int, mixed>

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.

public getIdentifier() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRow()

Returns the whole database row of the current record.

public getRow() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTableName()

public getTableName() : string
Return values
string

setIdentifier()

Allows to modify or completely replace the initialized data structure identifier.

public setIdentifier(array<string|int, mixed> $identifier) : void
Parameters
$identifier : array<string|int, mixed>

        
On this page

Search results