diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b083aed..b048dc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,7 @@ jobs: matrix: php-version: - 8.1 + - 8.2 typoscript-lint: name: "TypoScript linter" runs-on: ubuntu-20.04 @@ -80,6 +81,7 @@ jobs: - "php:sniff" php-version: - 8.1 + - 8.2 xliff-lint: name: "Xliff linter" runs-on: ubuntu-20.04 @@ -115,12 +117,12 @@ jobs: run: | composer require --no-progress typo3/minimal:"$TYPO3" composer show - - if: "matrix.composer-dependencies == 'lowest'" + - if: matrix.composer-dependencies == 'lowest' name: "Install lowest dependencies with composer" run: | composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest composer show - - if: "matrix.composer-dependencies == 'highest'" + - if: matrix.composer-dependencies == 'highest' name: "Install highest dependencies with composer" run: | composer update --no-ansi --no-interaction --no-progress --with-dependencies @@ -135,5 +137,6 @@ jobs: - lowest php-version: - 8.1 + - 8.2 typo3-version: - ^12.4 diff --git a/Classes/Command/UpdateQbankFileStatusCommand.php b/Classes/Command/UpdateQbankFileStatusCommand.php index 4c99553..a607f45 100644 --- a/Classes/Command/UpdateQbankFileStatusCommand.php +++ b/Classes/Command/UpdateQbankFileStatusCommand.php @@ -115,6 +115,15 @@ protected function execute(InputInterface $input, OutputInterface $output) continue; } + } catch (\Throwable $th) { + $io->writeln( + sprintf( + 'QBank file [%s] was not found: "%s"', + $file['tx_qbank_id'], + $th->getMessage() + ) + ); + break; } $remoteUpdate = (int)$media->getUpdated()->getTimestamp(); diff --git a/Classes/Controller/ManagementController.php b/Classes/Controller/ManagementController.php index 4732271..2e0e934 100644 --- a/Classes/Controller/ManagementController.php +++ b/Classes/Controller/ManagementController.php @@ -33,6 +33,7 @@ use TYPO3\CMS\Core\Imaging\Icon; use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Localization\LanguageService; +use TYPO3\CMS\Core\Log\LogManager; use TYPO3\CMS\Core\Messaging\AbstractMessage; use TYPO3\CMS\Core\Page\JavaScriptModuleInstruction; use TYPO3\CMS\Core\Page\PageRenderer; @@ -90,7 +91,24 @@ public function initializeAction(): void */ protected function initializeView(): void { + $apiStatus = []; + try { + $checkStatus = $this->qbankService->fetchMediaProperties(); + } catch (\Throwable $th) { + $apiStatus = [ + 'errorMessage' => $th->getMessage(), + 'errorCode' => $th->getCode(), + ]; + $logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__); + $logger->error( + sprintf( + 'Failed to connect to QBank API: "%s"', + $th->getMessage() + ) + ); + } $this->moduleTemplate->assignMultiple([ + 'apiStatus' => $apiStatus, 'dateFormat' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], 'timeFormat' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], 'dateTimeFormat' => @@ -192,7 +210,11 @@ protected function overviewAction(): ResponseInterface { $this->generateDropdownMenu('overview'); $this->generateButtons('overview'); - $properties = $this->qbankService->fetchMediaProperties(); + try { + $properties = $this->qbankService->fetchMediaProperties(); + } catch (\Throwable $th) { + $properties = []; + } $this->moduleTemplate->assign('properties', $properties); return $this->moduleTemplate->renderResponse('Management/Overview'); } @@ -206,9 +228,14 @@ protected function mappingsAction(): ResponseInterface $this->generateButtons('mappings'); $mappingRepository = GeneralUtility::makeInstance(MappingRepository::class); $mappings = $mappingRepository->findAll(); + try { + $mediaProperties = $this->qbankService->fetchMediaProperties(); + } catch (\Throwable $th) { + $mediaProperties = []; + } $this->moduleTemplate->assignMultiple([ 'mappings' => $mappings, - 'mediaProperties' => $this->qbankService->fetchMediaProperties(), + 'mediaProperties' => $mediaProperties, 'fileProperties' => PropertyUtility::getFileProperties(), ]); return $this->moduleTemplate->renderResponse('Management/Mappings'); diff --git a/Classes/Hook/MediaUsageReporterDataHandlerHook.php b/Classes/Hook/MediaUsageReporterDataHandlerHook.php index 9fe2676..81676f0 100644 --- a/Classes/Hook/MediaUsageReporterDataHandlerHook.php +++ b/Classes/Hook/MediaUsageReporterDataHandlerHook.php @@ -5,7 +5,9 @@ namespace Pixelant\Qbank\Hook; use Pixelant\Qbank\Service\QbankService; +use Pixelant\Qbank\Utility\MessageUtility; use TYPO3\CMS\Core\DataHandling\DataHandler; +use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\MathUtility; @@ -26,9 +28,20 @@ public function processDatamap_afterAllOperations(DataHandler $dataHandler): voi foreach ($dataHandler->datamap['sys_file_reference'] ?? [] as $id => $record) { // Only process new records if (!MathUtility::canBeInterpretedAsInteger($id)) { - GeneralUtility::makeInstance(QbankService::class)->reportMediaUsageInFileReference( - $dataHandler->substNEWwithIDs[$id] - ); + try { + GeneralUtility::makeInstance(QbankService::class)->reportMediaUsageInFileReference( + $dataHandler->substNEWwithIDs[$id] + ); + } catch (\Throwable $th) { + MessageUtility::enqueueMessage( + sprintf( + 'Media usage was not reported to QBank: "%s"', + $th->getMessage() + ), + 'Connection to QBank API failed', + ContextualFeedbackSeverity::ERROR + ); + } } } } @@ -52,22 +65,33 @@ public function processCmdmap_preProcess( DataHandler $dataHandler ): void { if ($table === 'sys_file_reference') { - switch ($command) { - case 'move': - /** @var QbankService $qbankService */ - $qbankService = GeneralUtility::makeInstance(QbankService::class); - $qbankService->removeMediaUsageInFileReference($id); - $qbankService->reportMediaUsageInFileReference($id); + try { + switch ($command) { + case 'move': + /** @var QbankService $qbankService */ + $qbankService = GeneralUtility::makeInstance(QbankService::class); + $qbankService->removeMediaUsageInFileReference($id); + $qbankService->reportMediaUsageInFileReference($id); - break; - case 'delete': - GeneralUtility::makeInstance(QbankService::class)->removeMediaUsageInFileReference($id); + break; + case 'delete': + GeneralUtility::makeInstance(QbankService::class)->removeMediaUsageInFileReference($id); - break; - case 'undelete': - GeneralUtility::makeInstance(QbankService::class)->reportMediaUsageInFileReference($id); + break; + case 'undelete': + GeneralUtility::makeInstance(QbankService::class)->reportMediaUsageInFileReference($id); - break; + break; + } + } catch (\Throwable $th) { + MessageUtility::enqueueMessage( + sprintf( + 'Media usage was not reported to QBank: "%s"', + $th->getMessage() + ), + 'Connection to QBank API failed', + ContextualFeedbackSeverity::ERROR + ); } } } diff --git a/Classes/Repository/AbstractRepository.php b/Classes/Repository/AbstractRepository.php index bc0cfa5..21c2207 100644 --- a/Classes/Repository/AbstractRepository.php +++ b/Classes/Repository/AbstractRepository.php @@ -6,7 +6,9 @@ use Pixelant\Qbank\Utility\QbankUtility; use QBNK\QBank\API\QBankApi; +use TYPO3\CMS\Core\Log\LogManager; use TYPO3\CMS\Core\SingletonInterface; +use TYPO3\CMS\Core\Utility\GeneralUtility; class AbstractRepository implements SingletonInterface { @@ -17,6 +19,16 @@ class AbstractRepository implements SingletonInterface public function __construct() { - $this->api = QbankUtility::getApi(); + try { + $this->api = QbankUtility::getApi(); + } catch (\Throwable $th) { + $logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__); + $logger->error( + sprintf( + 'Failed to connect to QBank API: "%s"', + $th->getMessage() + ) + ); + } } } diff --git a/Classes/Repository/MediaUsageRepository.php b/Classes/Repository/MediaUsageRepository.php index b348d54..fc785f3 100644 --- a/Classes/Repository/MediaUsageRepository.php +++ b/Classes/Repository/MediaUsageRepository.php @@ -81,7 +81,7 @@ public function findByQbankAndLocalId(int $qbankId, string $localId): array $result = []; foreach ($usages as $usage) { - if ($usage->getContext()['localID'] === $localId) { + if (($usage->getContext()['localID'] ?? '') === $localId) { $result[] = $usage; } } @@ -103,7 +103,7 @@ public function findByQbankId(int $qbankId): array return $this->api->media()->listUsages($qbankId); } - return $this->api->media()->listUsages($qbankId, $sessionSourceId); + return $this->api->media()->listUsages($qbankId, (string)$sessionSourceId); } /** diff --git a/Classes/Service/QbankService.php b/Classes/Service/QbankService.php index a2a6147..45303e9 100644 --- a/Classes/Service/QbankService.php +++ b/Classes/Service/QbankService.php @@ -20,6 +20,7 @@ use Pixelant\Qbank\Service\Event\FilePropertyChangeEvent; use Pixelant\Qbank\Service\Event\FileReferenceUrlEvent; use Pixelant\Qbank\Service\Event\ResolvePageTitleEvent; +use Pixelant\Qbank\Utility\MessageUtility; use Pixelant\Qbank\Utility\PropertyUtility; use Pixelant\Qbank\Utility\QbankUtility; use QBNK\QBank\API\Exception\RequestException; @@ -37,6 +38,7 @@ use TYPO3\CMS\Core\Resource\ResourceFactory; use TYPO3\CMS\Core\SingletonInterface; use TYPO3\CMS\Core\Site\SiteFinder; +use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\StringUtility; @@ -252,6 +254,17 @@ public function synchronizeMetadata(int $fileId): void 1625149218 ); } + } catch (\Throwable $th) { + MessageUtility::enqueueMessage( + sprintf( + 'Could not synchronize metadata for file [%s]: "%s"', + $fileId, + $th->getMessage() + ), + 'QBank', + ContextualFeedbackSeverity::ERROR + ); + return; } $metaDataMappings = GeneralUtility::makeInstance(MappingRepository::class)->findAllAsKeyValuePairs(false); diff --git a/Classes/Utility/MessageUtility.php b/Classes/Utility/MessageUtility.php new file mode 100644 index 0000000..a6b2276 --- /dev/null +++ b/Classes/Utility/MessageUtility.php @@ -0,0 +1,46 @@ +getPropertyFromAspect('backend.user', 'id'); + + if ($beUserId > 0) { + $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); + $notificationQueue = $flashMessageService->getMessageQueueByIdentifier( + FlashMessageQueue::NOTIFICATION_QUEUE + ); + $flashMessage = GeneralUtility::makeInstance( + FlashMessage::class, + $message, + $title, + $severity, + true + ); + $notificationQueue->enqueue($flashMessage); + } + + $logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__); + $logger->error($message . PHP_EOL . $title); + } +} diff --git a/Classes/Utility/PropertyUtility.php b/Classes/Utility/PropertyUtility.php index eb4c158..d6d0e4e 100644 --- a/Classes/Utility/PropertyUtility.php +++ b/Classes/Utility/PropertyUtility.php @@ -17,8 +17,6 @@ */ class PropertyUtility { - protected static $filePropertyTypeConverterCache = []; - /** * Returns the file properties array from $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']. * @@ -29,12 +27,10 @@ public static function getFileProperties(): array $properties = $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties'] ?? []; foreach ($properties as $key => &$property) { - if (is_callable($property['label'])) { - $property['label'] = $property['label']() ?? $key; - } - if (!isset($property['label'])) { - $property['label'] = $key; + $property['label'] = $GLOBALS['TCA']['sys_file']['columns'][$key]['label'] + ?? $GLOBALS['TCA']['sys_file_metadata']['columns'][$key]['label'] + ?? $key; } } @@ -50,10 +46,6 @@ public static function getFileProperties(): array */ public static function getTypeConverterForFileProperty(string $filePropertyName): TypeConverterInterface { - if (isset(self::$filePropertyTypeConverterCache[$filePropertyName])) { - return self::$filePropertyTypeConverterCache[$filePropertyName]; - } - $propertyConfiguration = self::getFileProperties()[$filePropertyName] ?? null; if (!isset($propertyConfiguration['typeConverter'])) { diff --git a/Resources/Private/Language/locallang_mod_qbank.xlf b/Resources/Private/Language/locallang_mod_qbank.xlf index ad44eaf..b800dba 100644 --- a/Resources/Private/Language/locallang_mod_qbank.xlf +++ b/Resources/Private/Language/locallang_mod_qbank.xlf @@ -21,6 +21,9 @@ TYPO3 property + + Connection to QBank API failed + diff --git a/Resources/Private/Partials/ApiStatus.html b/Resources/Private/Partials/ApiStatus.html new file mode 100644 index 0000000..67f0df5 --- /dev/null +++ b/Resources/Private/Partials/ApiStatus.html @@ -0,0 +1,10 @@ + + + diff --git a/Resources/Private/Templates/Management/List.html b/Resources/Private/Templates/Management/List.html index 2823c2a..acb04c4 100644 --- a/Resources/Private/Templates/Management/List.html +++ b/Resources/Private/Templates/Management/List.html @@ -11,6 +11,8 @@

+ + diff --git a/Resources/Private/Templates/Management/Mappings.html b/Resources/Private/Templates/Management/Mappings.html index 5e1befe..da75491 100644 --- a/Resources/Private/Templates/Management/Mappings.html +++ b/Resources/Private/Templates/Management/Mappings.html @@ -10,6 +10,9 @@

+ + + @@ -31,7 +34,10 @@

- + + + ({mapping.source_property}) +

+ +

{propertyType.name} - [{propertyType.systemName}] - {propertyType.description} - {propertyType.dataTypeId}

diff --git a/Resources/Public/JavaScript/qbank-media.js b/Resources/Public/JavaScript/qbank-media.js index e28bf10..0136f68 100644 --- a/Resources/Public/JavaScript/qbank-media.js +++ b/Resources/Public/JavaScript/qbank-media.js @@ -50,7 +50,6 @@ class QbankMedia { // Since the web component is used in a modal and therefore in outer frames, we have to import the module in the // top level scope. Not doing so causes issues in at least Firefox. // await topLevelModuleImport('@typo3/backend/form-engine/element/online-media-form-element.js'); - console.log('QbankMedia'); this.registerEvents(); }); } @@ -62,12 +61,8 @@ class QbankMedia { } validateMedia(trigger, media) { - console.log('addMedia'); const allowedExtensions = trigger.dataset.fileAllowed.split(','); const modalIllegalExtension = trigger.dataset.modalIllegalExtension; - console.log('allowedExtensions', allowedExtensions); - console.log('media.extension', media.extension); - console.log('modalIllegalExtension', modalIllegalExtension); if (allowedExtensions.indexOf(media.extension) === -1) { Notification.error(modalIllegalExtension.replace('{0}', media.extension), media.extension); @@ -78,11 +73,8 @@ class QbankMedia { } addMedia(trigger, modalElement, media) { - console.log('addMedia'); const irreObjectUid = trigger.dataset.fileIrreObject; const msgRequestFailed = trigger.dataset.modalRequestFailed ?? ''; - console.log('irreObjectUid', irreObjectUid); - console.log('msgRequestFailed', msgRequestFailed); NProgress.start(); @@ -90,7 +82,6 @@ class QbankMedia { mediaId: media.mediaId }).then(async (response) => { const data = await response.resolve(); - console.log('data', data); if (data.success && data.fileUid) { const message = { actionName: 'typo3:foreignRelation:insert', @@ -111,11 +102,6 @@ class QbankMedia { const qbankHost = trigger.dataset.qbankHost || ''; const qbankDeploymentsites = trigger.dataset.qbankDeploymentsites || ''; const qbankToken = trigger.dataset.qbankToken || ''; - - console.log('qbankHost' , qbankHost); - console.log('qbankDeploymentsites' , qbankDeploymentsites); - // console.log('qbankToken' , qbankToken); - const onlineMediaForm = document.createElement('iframe'); onlineMediaForm.setAttribute('extensions', trigger.dataset.onlineMediaAllowed); @@ -157,11 +143,7 @@ class QbankMedia { }, qbMedia: 'qbMedia' }, - onReady: function () { - console.log('qBankIframe onReady'); - }, onSelect: function (media, crop, previousUsage) { - console.log('qBankIframe onSelect'); if (window.qbMedia.validateMedia(trigger, media)) { window.qbMedia.addMedia(trigger, modalElement, media) } diff --git a/ext_conf_template.txt b/ext_conf_template.txt index 0d4f3a4..cf573b6 100644 --- a/ext_conf_template.txt +++ b/ext_conf_template.txt @@ -13,11 +13,11 @@ host = # cat=basic/configure/6; type=string; label=Target folder for downloaded files: downloadFolder = 1:user_upload/qbank +# cat=basic/configure/7; type=string; label=Deployment sites: Comma-separated list of deployment sites. +deploymentSites = + # cat=basic/configure/8; type=options[No autoupdate=0,Metadata=1,File=2,Metadata and file=3]; label=Allow update of metadata and file from command (scheduler/cli): autoUpdate = 0 # cat=optional/setting/1; type=int; label=Event session source ID: Setting this will enable usage reporting. To get a session source issued, contact support@qbank.se. sessionSource = - -# cat=optional/setting/2; type=string; label=Deployment sites: Comma-separated list of deployment sites. Empty means show all. -deploymentSites = diff --git a/ext_emconf.php b/ext_emconf.php index 9084335..3c951c4 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -8,7 +8,7 @@ 'author_email' => 'info@pixelant.net', 'author_company' => 'Pixelant', 'state' => 'stable', - 'version' => '2.0.0', + 'version' => '2.0.1', 'constraints' => [ 'depends' => [ 'typo3' => '12.0.0-12.4.99', diff --git a/ext_localconf.php b/ext_localconf.php index c384876..7514bad 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -30,58 +30,131 @@ $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties'] = []; } -$fileProperties = [ - 'name' => [ - 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'label' => function() { - return $GLOBALS['TCA']['sys_file']['columns']['name']['label']; - }, - 'disabled' => false, - ] +// QBank file properties. +$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['name'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file.name', + 'disabled' => false, ]; -$mappableMetaDataProperties = [ - 'title' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'description' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'alternative' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, +$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['title'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file.title', + 'disabled' => false, +]; + +$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['description'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file.description', + 'disabled' => false, +]; + +$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['alternative'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file.alternative', + 'disabled' => false, ]; if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('filemetadata')) { - $mappableMetaDataProperties = array_merge( - $mappableMetaDataProperties, - [ - 'keywords' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'caption' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'creator_tool' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'download_name' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'creator' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'publisher' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'source' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'copyright' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'location_country' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'location_region' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'location_city' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - 'latitude' => \Pixelant\Qbank\TypeConverter\FloatTypeConverter::class, - 'longitude' => \Pixelant\Qbank\TypeConverter\FloatTypeConverter::class, - 'ranking' => \Pixelant\Qbank\TypeConverter\FloatTypeConverter::class, - 'content_creation_date' => \Pixelant\Qbank\TypeConverter\IntegerTypeConverter::class, - 'content_modification_date' => \Pixelant\Qbank\TypeConverter\IntegerTypeConverter::class, - 'note' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, - ] - ); -} + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['keywords'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.keywords', + 'disabled' => false, + ]; -foreach ($mappableMetaDataProperties as $metaDataProperty => $typeConverter) { - $fileProperties[$metaDataProperty] = [ - 'typeConverter' => $typeConverter, - 'label' => function() use ($metaDataProperty) { - return $GLOBALS['TCA']['sys_file_metadata']['columns'][$metaDataProperty]['label']; - }, + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['caption'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.caption', 'disabled' => false, ]; -} -$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties'] = array_merge_recursive( - $fileProperties, - $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties'] ?? [] -); + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['creator_tool'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.creator_tool', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['download_name'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.download_name', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['creator'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.creator', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['publisher'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.publisher', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['source'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.source', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['copyright'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.copyright', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['location_country'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_country', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['location_region'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_region', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['location_city'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_city', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['latitude'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\FloatTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.latitude', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['longitude'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\FloatTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.longitude', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['ranking'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\FloatTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.ranking', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['content_creation_date'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\IntegerTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_creation_date', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['content_modification_date'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\IntegerTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_modification_date', + 'disabled' => false, + ]; + + $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['qbank']['fileProperties']['note'] = [ + 'typeConverter' => \Pixelant\Qbank\TypeConverter\StringTypeConverter::class, + 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.note', + 'disabled' => false, + ]; +}