/** * Flatten result value from FileProcessor * * The value can be a File, Folder or boolean * * @param bool|\TYPO3\CMS\Core\Resource\File|\TYPO3\CMS\Core\Resource\Folder $result * @return bool|string|array */ protected function flattenResultDataValue($result) { if ($result instanceof \TYPO3\CMS\Core\Resource\File) { $result = array_merge($result->toArray(), array('date' => BackendUtility::date($result->getModificationTime()), 'iconClasses' => \TYPO3\CMS\Backend\Utility\IconUtility::mapFileExtensionToSpriteIconClass($result->getExtension()))); } elseif ($result instanceof \TYPO3\CMS\Core\Resource\Folder) { $result = $result->getIdentifier(); } return $result; }