Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FlexFormTools callbackFunction #584

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions Classes/Configuration/FlexForm/FlexFormTools8.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use TYPO3\CMS\Core\Configuration\FlexForm\Exception\InvalidTcaException;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\MathUtility;

Expand Down Expand Up @@ -334,33 +335,4 @@ protected function getDataStructureIdentifierFromRecord(array $fieldTca, string
return $dataStructureIdentifier;
}

/***********************************
*
* Processing functions
*
***********************************/
/**
* Call back function for \TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools class
* Basically just setting the value in a new array (thus cleaning because only values that are valid are visited!)
*
* @param array $dsArr Data structure for the current value
* @param mixed $data Current value
* @param array $PA Additional configuration used in calling function
* @param string $path Path of value in DS structure
* @param FlexFormTools $pObj caller
*/
// phpcs:disable PSR1.Methods.CamelCapsMethodName
public function cleanFlexFormXML_callBackFunction($dsArr, $data, $PA, $path, $pObj)
{
// phpcs:enable
// Just setting value in our own result array, basically replicating the structure:
$pObj->setArrayValueByPath($path, $this->cleanFlexFormXML, $data);
// Looking if an "extension" called ".vDEFbase" is found and if so, accept that too:
if ($GLOBALS['TYPO3_CONF_VARS']['BE']['flexFormXMLincludeDiffBase']) {
$vDEFbase = $pObj->getArrayValueByPath($path . '.vDEFbase', $pObj->traverseFlexFormXMLData_Data);
if (isset($vDEFbase)) {
$pObj->setArrayValueByPath($path . '.vDEFbase', $this->cleanFlexFormXML, $vDEFbase);
}
}
}
}
Loading