Skip to content

Commit

Permalink
Merge pull request #350 from t3solution/5.3.2
Browse files Browse the repository at this point in the history
New release v5.3.2
  • Loading branch information
t3solution authored Aug 13, 2023
2 parents 6952556 + 561a91b commit f98c99f
Show file tree
Hide file tree
Showing 12 changed files with 3,629 additions and 3,710 deletions.
32 changes: 16 additions & 16 deletions Classes/Backend/EventListener/FlexForm/NewsFlexformEvent.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace T3SBS\T3sbootstrap\Backend\EventListener\FlexForm;
Expand All @@ -9,23 +10,22 @@

class NewsFlexformEvent
{
public function __invoke(AfterFlexFormDataStructureParsedEvent $event): void
{
$dataStructure = $event->getDataStructure();
$identifier = $event->getIdentifier();

if ($identifier['type'] === 'tca' && $identifier['tableName'] === 'tt_content'
&& ($identifier['dataStructureKey'] === '*,news_pi1' || $identifier['dataStructureKey'] === '*,news_newsliststicky')) {
public function __invoke(AfterFlexFormDataStructureParsedEvent $event): void
{
$dataStructure = $event->getDataStructure();
$identifier = $event->getIdentifier();

$file = GeneralUtility::getFileAbsFileName('EXT:t3sbootstrap/Resources/Private/Extensions/news/Configuration/FlexForms/News.xml');
$content = file_get_contents($file);
if ($identifier['type'] === 'tca' && $identifier['tableName'] === 'tt_content'
&& ($identifier['dataStructureKey'] === '*,news_pi1' || $identifier['dataStructureKey'] === '*,news_newsliststicky' || $identifier['dataStructureKey'] === '*,news_newsdetail')) {
$file = GeneralUtility::getFileAbsFileName('EXT:t3sbootstrap/Resources/Private/Extensions/news/Configuration/FlexForms/News.xml');
$content = file_get_contents($file);

if ($content) {
$extraDataStructure['sheets']['extraEntry'] = GeneralUtility::xml2array($content);
ArrayUtility::mergeRecursiveWithOverrule($dataStructure, $extraDataStructure);
}
}
if ($content) {
$extraDataStructure['sheets']['extraEntry'] = GeneralUtility::xml2array($content);
ArrayUtility::mergeRecursiveWithOverrule($dataStructure, $extraDataStructure);
}
}

$event->setDataStructure($dataStructure);
}
$event->setDataStructure($dataStructure);
}
}
1,572 changes: 807 additions & 765 deletions Classes/DataProcessing/ConfigProcessor.php

Large diffs are not rendered by default.

Loading

0 comments on commit f98c99f

Please sign in to comment.