52 if (isset($processorConfiguration[
'if.']) && !$cObj->
checkIf($processorConfiguration[
'if.'])) {
53 return $processedData;
58 $fileCollector = GeneralUtility::makeInstance(FileCollector::class);
61 if (!empty($processorConfiguration[
'references.'])) {
62 $referenceConfiguration = $processorConfiguration[
'references.'];
63 $relationField = $cObj->
stdWrapValue(
'fieldName', $referenceConfiguration);
66 if (!empty($relationField)) {
69 if (!empty($relationTable)) {
70 $fileCollector->addFilesFromRelation($relationTable, $relationField, $cObj->data);
76 $files = $cObj->
stdWrapValue(
'files', $processorConfiguration);
78 $files = GeneralUtility::intExplode(
',', $files,
true);
79 $fileCollector->addFiles($files);
83 $collections = $cObj->
stdWrapValue(
'collections', $processorConfiguration);
84 if (!empty($collections)) {
85 $collections = GeneralUtility::trimExplode(
',', $collections,
true);
86 $fileCollector->addFilesFromFileCollections($collections);
90 $folders = $cObj->
stdWrapValue(
'folders', $processorConfiguration);
91 if (!empty($folders)) {
92 $folders = GeneralUtility::trimExplode(
',', $folders,
true);
93 $fileCollector->addFilesFromFolders($folders, !empty($processorConfiguration[
'folders.'][
'recursive']));
97 $sortingProperty = $cObj->
stdWrapValue(
'sorting', $processorConfiguration);
98 if ($sortingProperty) {
101 $processorConfiguration[
'sorting.'] ?? [],
105 $fileCollector->sort($sortingProperty, $sortingDirection);
109 $targetVariableName = $cObj->
stdWrapValue(
'as', $processorConfiguration,
'files');
110 $processedData[$targetVariableName] = $fileCollector->getFiles();
112 return $processedData;