Skip to content
Snippets Groups Projects
Commit 3933c27d authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Benni Mack
Browse files

[!!!][TASK] Remove possibility to pass record uid to AbstractTreeView::getIcon()

It's no longer possible to pass a records' uid to
AbstractTreeView::getIcon(), since the methods
first argument "$row" is now type hinted "array".

Resolves: #96144
Related: #92922
Releases: main
Change-Id: I0cf19bb361720905ee05140c611a7d8fafa00df5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72380


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent a037b0ff
Branches
Tags
No related merge requests found
......@@ -334,19 +334,8 @@ abstract class AbstractTreeView
* @param array $row The row to get the icon for
* @return string The icon markup, wrapped into a span tag, with the records title as title attribute
*/
public function getIcon($row): string
public function getIcon(array $row): string
{
if (is_int($row)) {
trigger_error(
'Calling ' . __METHOD__ . ' with argument $row containing the records uid is deprecated and will be removed in v12. Use the full row instead.',
E_USER_DEPRECATED
);
$row = BackendUtility::getRecord($this->table, $row);
if ($row === null) {
return '';
}
}
$title = $this->getTitleAttrib($row);
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$icon = $row['is_siteroot'] ? $iconFactory->getIcon('apps-pagetree-folder-root', Icon::SIZE_SMALL) : $iconFactory->getIconForRecord($this->table, $row, Icon::SIZE_SMALL);
......
......@@ -48,6 +48,10 @@ The following methods changed signature according to previous deprecations in v1
- :php:`\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->ATagParams` (argument 2 is removed)
The following methods changed signature according to previous deprecations in v11 and are now type hinted:
- :php:`\TYPO3\CMS\Backend\Tree\View\AbstractTreeView->getIcon` (first argument is now type hinted `array`)
The following public class properties have been dropped:
- :php:`\Full\Class\Name->propertyName`
......
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