diff --git a/Classes/Controller/Backend/FileSizeModuleController.php b/Classes/Controller/Backend/FileSizeModuleController.php index 4d7c1a3..31fc401 100644 --- a/Classes/Controller/Backend/FileSizeModuleController.php +++ b/Classes/Controller/Backend/FileSizeModuleController.php @@ -59,12 +59,12 @@ public function fileSizesAction(): ResponseInterface { if($this->request->getArguments() != NULL) { if($this->request->hasArgument('fileExtensions') && !empty($this->request->getArgument('fileExtensions'))) { $this->fileExtensions = $this->request->getArgument('fileExtensions'); - $listUrlParams['tx_hhextfilesize_file_hhextfilesizetxhhextfilesize[fileExtensions]'] = $this->fileExtensions; + $listUrlParams['fileExtensions'] = $this->fileExtensions; } if($this->request->hasArgument('maxFileSize') && !empty($this->request->getArgument('maxFileSize'))) { $this->maxFileSize = intval($this->request->getArgument('maxFileSize')); - $listUrlParams['tx_hhextfilesize_file_hhextfilesizetxhhextfilesize[maxFileSize]'] = $this->maxFileSize; + $listUrlParams['maxFileSize'] = $this->maxFileSize; } } @@ -144,15 +144,6 @@ public function human_filesize(int $bytes, int $decimals = 2): string { * @return string URL */ public function listURL(array $params = []): string { - $params = array_replace_recursive([ - 'pointer' => 'tx_hhextfilesize', - 'id' => 1, - 'tx_hhextfilesize_file_hhextfilesizetxhhextfilesize[action]' => 'fileSizes', - 'tx_hhextfilesize_file_hhextfilesizetxhhextfilesize[controller]' => 'Backend\FileSizeModule', - ], $params); - - $params = array_filter($params); - return (string)$this->backendUriBuilder->buildUriFromRoute('file_HhExtFilesizeTxHhextfilesize', $params); } } diff --git a/Configuration/Backend/Modules.php b/Configuration/Backend/Modules.php index 454fc0a..ecddb7c 100644 --- a/Configuration/Backend/Modules.php +++ b/Configuration/Backend/Modules.php @@ -1,32 +1,16 @@ [ + 'file_HhExtFilesizeTxHhextfilesize' => [ 'parent' => 'file', 'position' => ['after' => 'web_info'], 'access' => 'user', 'workspaces' => 'live', 'path' => '/module/files/filesizes', - 'labels' => 'LLL:EXT:examples/Resources/Private/Language/Module/locallang_mod.xlf', - 'extensionName' => 'Examples', + 'labels' => 'LLL:EXT:hh_ext_filesize/Resources/Private/Language/locallang_mod.xlf', + 'extensionName' => 'HhExtFilesize', 'iconIdentifier' => 'tx_examples-backend-module', 'controllerActions' => [ FileSizeModuleController::class => [ diff --git a/Configuration/Backend/Routes.php b/Configuration/Backend/Routes.php index a77abc7..921122e 100644 --- a/Configuration/Backend/Routes.php +++ b/Configuration/Backend/Routes.php @@ -2,7 +2,7 @@ return [ 'file_HhExtFilesizeTxHhextfilesize' => [ - 'path' => '/file-sizes', + 'path' => '/module/files/filesizes', 'access' => 'public', 'target' => HauerHeinrich\HhExtFilesize\Controller\Backend\FileSizeModuleController::class . '::fileSizesAction', ], diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index bb8c428..369eedd 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -1,4 +1,31 @@ module.tx_hhextfilesize { + layoutRootPaths { + 0 = EXT:hh_ext_filesize/Resources/Private/Layouts/ + 10 = {$module.tx_hhextfilesize.view.layoutRootPath} + } + partialRootPaths { + 0 = EXT:hh_ext_filesize/Resources/Private/Partials/ + 10 = {$module.tx_hhextfilesize.view.partialRootPath} + } + templateRootPaths { + 0 = EXT:hh_ext_filesize/Resources/Private/Templates/ + 10 = {$module.tx_hhextfilesize.view.templateRootPath} + } + + view { + layoutRootPaths { + 0 = EXT:hh_ext_filesize/Resources/Private/Layouts/ + 10 = {$module.tx_hhextfilesize.view.layoutRootPath} + } + partialRootPaths { + 0 = EXT:hh_ext_filesize/Resources/Private/Partials/ + 10 = {$module.tx_hhextfilesize.view.partialRootPath} + } + templateRootPaths { + 0 = EXT:hh_ext_filesize/Resources/Private/Templates/ + 10 = {$module.tx_hhextfilesize.view.templateRootPath} + } + } settings { } diff --git a/Resources/Private/Templates/Backend/FileSizeModule/FileSizes.html b/Resources/Private/Templates/Backend/FileSizeModule/FileSizes.html index 8f4a740..8463d97 100644 --- a/Resources/Private/Templates/Backend/FileSizeModule/FileSizes.html +++ b/Resources/Private/Templates/Backend/FileSizeModule/FileSizes.html @@ -13,7 +13,7 @@

List Filesizes

- +
diff --git a/composer.json b/composer.json index 4f89a7f..b507412 100644 --- a/composer.json +++ b/composer.json @@ -8,10 +8,10 @@ "role": "Developer" } ], - "version": "1.0.0", + "version": "2.0.0", "require": { "php": ">=8", - "typo3/cms-core": "^11.5.0" + "typo3/cms-core": "^12.4.0" }, "autoload": { "psr-4": { diff --git a/ext_emconf.php b/ext_emconf.php index 71472b9..302f02d 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -20,11 +20,11 @@ 'uploadfolder' => 0, 'createDirs' => '', 'clearCacheOnLoad' => 0, - 'version' => '1.0.0', + 'version' => '2.0.0', 'constraints' => [ 'depends' => [ 'php' => '>=8', - 'typo3' => '^11.5.0', + 'typo3' => '^12.4.0', ], 'conflicts' => [], 'suggests' => [],