Skip to content

Commit

Permalink
[!!!][TASK] Remove FileList editIcons hook
Browse files Browse the repository at this point in the history
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 <typo3@wouterwolters.nl>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Nikita Hovratov <nikita.h@live.de>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Nikita Hovratov <nikita.h@live.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
o-ba authored and lolli42 committed Dec 2, 2021
1 parent f6109e0 commit 3c2b8fa
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 50 deletions.
Expand Up @@ -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:
Expand Down Expand Up @@ -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']`
Expand Down
19 changes: 0 additions & 19 deletions typo3/sysext/filelist/Classes/FileList.php
Expand Up @@ -1062,25 +1062,6 @@ public function makeEdit($fileOrFolderObject)
$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 !== []) {
Expand Down
31 changes: 0 additions & 31 deletions typo3/sysext/filelist/Classes/FileListEditIconHookInterface.php

This file was deleted.

Expand Up @@ -509,6 +509,7 @@
'$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\']' => [
Expand Down
Expand Up @@ -1816,6 +1816,7 @@
'TYPO3\CMS\Filelist\FileListEditIconHookInterface' => [
'restFiles' => [
'Deprecation-95077-FilelistEditIconsHook.rst',
'Breaking-96107-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\Resource\Hook\FileDumpEIDHookInterface' => [
Expand Down

0 comments on commit 3c2b8fa

Please sign in to comment.