From ee6f65389f9da75c5cd2836ab64b1676b08eda47 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 17:07:06 +0200 Subject: [PATCH] [TASK] Remove FlexForm event listeners (#218) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These examples for event listeners do not really make sense: - The identifiers are referring to "form-framework" - A data structure is referring to "myext" - Table "tx_myext_sometable" is unknown - Type "some_other_type" is unknown Therefore, they are removed. Releases: main, 12.4 Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com> --- .../FlexFormParsingModifyEventListener.php | 62 ------------------- Configuration/Services.yaml | 15 ----- 2 files changed, 77 deletions(-) delete mode 100644 Classes/EventListener/Core/Configuration/FlexFormParsingModifyEventListener.php diff --git a/Classes/EventListener/Core/Configuration/FlexFormParsingModifyEventListener.php b/Classes/EventListener/Core/Configuration/FlexFormParsingModifyEventListener.php deleted file mode 100644 index dd9c73f..0000000 --- a/Classes/EventListener/Core/Configuration/FlexFormParsingModifyEventListener.php +++ /dev/null @@ -1,62 +0,0 @@ -getIdentifier(); - if (($identifier['type'] ?? '') === 'my_custom_type') { - $event->setDataStructure('FILE:EXT:myext/Configuration/FlexForms/MyFlexform.xml'); - } - } - - public function modifyDataStructure(AfterFlexFormDataStructureParsedEvent $event): void - { - $identifier = $event->getIdentifier(); - if (($identifier['type'] ?? '') === 'my_custom_type') { - $parsedDataStructure = $event->getDataStructure(); - $parsedDataStructure['sheets']['sDEF']['ROOT']['sheetTitle'] = 'Some dynamic custom sheet title'; - $event->setDataStructure($parsedDataStructure); - } - } - - public function setDataStructureIdentifier(BeforeFlexFormDataStructureIdentifierInitializedEvent $event): void - { - if ($event->getTableName() === 'tx_myext_sometable') { - $event->setIdentifier([ - 'type' => 'my_custom_type', - ]); - } - } - - public function modifyDataStructureIdentifier(AfterFlexFormDataStructureIdentifierInitializedEvent $event): void - { - $identifier = $event->getIdentifier(); - if (($identifier['type'] ?? '') === 'some_other_type') { - $identifier['type'] = 'my_custom_type'; - } - $event->setIdentifier($identifier); - } -} diff --git a/Configuration/Services.yaml b/Configuration/Services.yaml index 254d9c7..8d979ed 100644 --- a/Configuration/Services.yaml +++ b/Configuration/Services.yaml @@ -17,21 +17,6 @@ services: - name: event.listener identifier: 'txExampleCheckExternalLinksToLocalPages' - T3docs\Examples\EventListener\Core\Configuration\FlexFormParsingModifyEventListener: - tags: - - name: event.listener - identifier: 'form-framework/set-data-structure' - method: 'setDataStructure' - - name: event.listener - identifier: 'form-framework/modify-data-structure' - method: 'modifyDataStructure' - - name: event.listener - identifier: 'form-framework/set-data-structure-identifier' - method: 'setDataStructureIdentifier' - - name: event.listener - identifier: 'form-framework/modify-data-structure-identifier' - method: 'modifyDataStructureIdentifier' - T3docs\Examples\Command\DoSomethingCommand: tags: - name: console.command