‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Configuration\Event\BeforeFlexFormDataStructureParsedEvent Class Reference
Inheritance diagram for TYPO3\CMS\Core\Configuration\Event\BeforeFlexFormDataStructureParsedEvent:

Public Member Functions

 __construct (private readonly array $identifier,)
 
 getDataStructure ()
 
 setDataStructure (array|string $dataStructure)
 
 getIdentifier ()
 
 isPropagationStopped ()
 

Private Attributes

array string null $dataStructure = null
 

Detailed Description

Listeners to this event are able to specify a flex form data structure that corresponds to a given identifier.

Listeners should call ->setDataStructure() to set the data structure (this can either be a resolved data structure string, a "FILE:" reference or a fully parsed data structure as array) or ignore the event to allow other listeners to set it. Do not set an empty array or string as this will immediately stop event propagation!

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

Definition at line 34 of file BeforeFlexFormDataStructureParsedEvent.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Configuration\Event\BeforeFlexFormDataStructureParsedEvent::__construct ( private readonly array  $identifier)

Definition at line 38 of file BeforeFlexFormDataStructureParsedEvent.php.

Member Function Documentation

◆ getDataStructure()

TYPO3\CMS\Core\Configuration\Event\BeforeFlexFormDataStructureParsedEvent::getDataStructure ( )

Returns the current data structure, which will always be null for listeners, since the event propagation is stopped as soon as a listener sets a data structure.

Definition at line 47 of file BeforeFlexFormDataStructureParsedEvent.php.

◆ getIdentifier()

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

◆ isPropagationStopped()

TYPO3\CMS\Core\Configuration\Event\BeforeFlexFormDataStructureParsedEvent::isPropagationStopped ( )

Definition at line 68 of file BeforeFlexFormDataStructureParsedEvent.php.

◆ setDataStructure()

TYPO3\CMS\Core\Configuration\Event\BeforeFlexFormDataStructureParsedEvent::setDataStructure ( array|string  $dataStructure)

Allows to either set an already parsed data structure as array, a file reference or the XML structure as string. Setting a data structure will immediately stop propagation. Avoid setting this parameter to an empty array or string as this will also stop propagation.

Definition at line 58 of file BeforeFlexFormDataStructureParsedEvent.php.

References TYPO3\CMS\Core\Configuration\Event\BeforeFlexFormDataStructureParsedEvent\$dataStructure.

Referenced by TYPO3\CMS\Core\Tests\Functional\Configuration\FlexForm\FlexFormToolsTest\parseDataStructureByIdentifierParsesDataStructureReturnedByEvent().

Member Data Documentation

◆ $dataStructure

array string null TYPO3\CMS\Core\Configuration\Event\BeforeFlexFormDataStructureParsedEvent::$dataStructure = null
private