Commit 3c2b8fac authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Christian Kuhn
Browse files

[!!!][TASK] Remove FileList editIcons hook

The FileList editIcons hook is superseded by
the PSR-14 ProcessFileListActionsEvent and
therefore now removed.

Resolves: #96191
Related: #95077
Releases: main
Change-Id: I796b97fbb1e39e8b0e527aa45d4e337fd433c3c0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72451

Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent f6109e05
......@@ -39,6 +39,7 @@ The following PHP interfaces that have previously been marked as deprecated for
- :php:`\TYPO3\CMS\Core\Resource\Hook\FileDumpEIDHookInterface`
- :php:`\TYPO3\CMS\Core\Utility\File\ExtendedFileUtilityProcessDataHookInterface`
- :php:`\TYPO3\CMS\Extbase\Mvc\View\ViewInterface`
- :php:`\TYPO3\CMS\Filelist\FileListEditIconHookInterface'`
- :php:`\TYPO3\CMS\Recordlist\RecordList\RecordListHookInterface`
The following PHP class aliases that have previously been marked as deprecated for v11 and were now removed:
......@@ -165,6 +166,7 @@ The following hooks have been removed:
- :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions']`
- :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['FileDumpEID.php']['checkFileAccess']`
- :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fileList']['editIconsHook']`
- :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/Modules/Recordlist/index.php']['drawHeaderHook']`
- :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/Modules/Recordlist/index.php']['drawFooterHook']`
- :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_extfilefunc.php']['processData']`
......
......@@ -1062,25 +1062,6 @@ class FileList
$cells['delete'] = $this->spaceIcon;
}
// Hook for manipulating edit icons.
// @deprecated will be removed in TYPO3 v12.0.
$cells['__fileOrFolderObject'] = $fileOrFolderObject;
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fileList']['editIconsHook'] ?? [] as $className) {
$hookObject = GeneralUtility::makeInstance($className);
if (!$hookObject instanceof FileListEditIconHookInterface) {
throw new \UnexpectedValueException(
$className . ' must implement interface ' . FileListEditIconHookInterface::class,
1235225797
);
}
$hookObject->manipulateEditIcons($cells, $this);
}
if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fileList']['editIconsHook'])) {
trigger_error('Using the hook $TYPO3_CONF_VARS[SC_OPTIONS][fileList][editIconsHook] will not work in TYPO3 v12.0 anymore. Use the PSR-14 based ProcessFileListActionsEvent instead.', E_USER_DEPRECATED);
}
unset($cells['__fileOrFolderObject']);
// Get clipboard actions
$clipboardActions = $this->makeClip($fileOrFolderObject);
if ($clipboardActions !== []) {
......
<?php
/*
* 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!
*/
namespace TYPO3\CMS\Filelist;
/**
* Interface for classes which hook into filelist module and manipulated edit icon array
* @deprecated will be removed in TYPO3 v12.0, Use the PSR-14 based ProcessFileListActionsEvent instead.
*/
interface FileListEditIconHookInterface
{
/**
* Modifies edit icon array
*
* @param array $cells Array of edit icons
* @param \TYPO3\CMS\Filelist\FileList $parentObject Parent object
*/
public function manipulateEditIcons(&$cells, &$parentObject);
}
......@@ -509,6 +509,7 @@ return [
'$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'fileList\'][\'editIconsHook\']' => [
'restFiles' => [
'Deprecation-95077-FilelistEditIconsHook.rst',
'Breaking-96107-DeprecatedFunctionalityRemoved.rst',
],
],
'$GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'FileDumpEID.php\'][\'checkFileAccess\']' => [
......
......@@ -1816,6 +1816,7 @@ return [
'TYPO3\CMS\Filelist\FileListEditIconHookInterface' => [
'restFiles' => [
'Deprecation-95077-FilelistEditIconsHook.rst',
'Breaking-96107-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\Resource\Hook\FileDumpEIDHookInterface' => [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment