diff --git a/typo3/sysext/cms/ext_tables.php b/typo3/sysext/cms/ext_tables.php index 1a126e33391ab16d08580db6bb986b14700f8e08..18600576d3a375d453cbb048559509cd1b02a29d 100644 --- a/typo3/sysext/cms/ext_tables.php +++ b/typo3/sysext/cms/ext_tables.php @@ -19,15 +19,4 @@ if (TYPO3_MODE === 'BE') { ); } // Add allowed records to pages: -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('pages_language_overlay,tt_content,sys_template,sys_domain,backend_layout'); - -if (!function_exists('user_sortPluginList')) { - function user_sortPluginList(array &$parameters) { - usort( - $parameters['items'], - function ($item1, $item2) { - return strcasecmp($GLOBALS['LANG']->sL($item1[0]), $GLOBALS['LANG']->sL($item2[0])); - } - ); - } -} \ No newline at end of file +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('pages_language_overlay,tt_content,sys_template,sys_domain,backend_layout'); \ No newline at end of file diff --git a/typo3/sysext/frontend/Classes/Hooks/TableColumnHooks.php b/typo3/sysext/frontend/Classes/Hooks/TableColumnHooks.php new file mode 100644 index 0000000000000000000000000000000000000000..2746b90ae09d99be19f6d915be6dfd44d5e9dc81 --- /dev/null +++ b/typo3/sysext/frontend/Classes/Hooks/TableColumnHooks.php @@ -0,0 +1,35 @@ +<?php + +namespace TYPO3\CMS\Frontend\Hooks; + +/** + * This file is part of the TYPO3 CMS project. + * + * It is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License, either version 2 + * of the License, or any later version. + * + * For the full copyright and license information, please read the + * LICENSE.txt file that was distributed with this source code. + * + * The TYPO3 project - inspiring people to share! + */ + +/** + * Hooks / manipulation data for TCA columns e.g. to sort items within itemsProcFunc + */ +class TableColumnHooks { + + /** + * sort list items (used for plugins, list_type) by name + * @param array $parameters + */ + public function sortPluginList(array &$parameters) { + usort( + $parameters['items'], + function ($item1, $item2) { + return strcasecmp($GLOBALS['LANG']->sL($item1[0]), $GLOBALS['LANG']->sL($item2[0])); + } + ); + } +} \ No newline at end of file diff --git a/typo3/sysext/frontend/Configuration/TCA/tt_content.php b/typo3/sysext/frontend/Configuration/TCA/tt_content.php index 0281b80b2715c985b86a00a2b127319e6b06db6d..da0af85197b6522694b8f5b7eb49e3b147f32b69 100644 --- a/typo3/sysext/frontend/Configuration/TCA/tt_content.php +++ b/typo3/sysext/frontend/Configuration/TCA/tt_content.php @@ -1189,7 +1189,7 @@ return array( '' ) ), - 'itemsProcFunc' => 'user_sortPluginList', + 'itemsProcFunc' => 'TYPO3\\CMS\\Frontend\\Hooks\\TableColumnHooks->sortPluginList', 'default' => '', 'authMode' => $GLOBALS['TYPO3_CONF_VARS']['BE']['explicitADmode'], 'iconsInOptionTags' => 1,