Project

General

Profile

Actions

Bug #72505

closed

Cannot override a record overlay

Added by Xavier Perseguers almost 9 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2016-01-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Prior to TYPO3 7 LTS, it was possible to override a record overlay in Web > List.

This was used in some extensions such as EXT:ig_ldap_sso_auth to visually show that a corresponding record was related to LDAP in Web > List:

Registration was done from one part in ext_tables.php:

$GLOBALS['TBE_STYLES']['spriteIconApi']['spriteIconRecordOverlayPriorities'][] = 'is_ldap_record';
$GLOBALS['TBE_STYLES']['spriteIconApi']['spriteIconRecordOverlayNames']['is_ldap_record'] = 'extensions-' . $_EXTKEY . '-overlay-ldap-record';

which allowed to register an additional overlay priority and the mapping to the corresponding icon to be used. This is something that is not possible anymore since the list of priorities and the mapping to the name is now hard coded in \TYPO3\CMS\Core\Imaging\IconFactory::$overlayPriorities and \TYPO3\CMS\Core\Imaging\IconFactory::$recordStatusMapping without any possibility to change them.

And another part was in ext_localconf.php:

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_iconworks.php']['overrideIconOverlay'][] = 'EXT:' . $_EXTKEY . '/Classes/Hooks/DatabaseRecordListIconUtility.php:Causal\\IgLdapSsoAuth\\Hooks\\DatabaseRecordListIconUtility';

The hook was previously called by \TYPO3\CMS\Backend\Utility\IconUtility::mapRecordOverlayToSpriteIconName but it has not been copied over. This has been documented as breaking by #69057 but without any possible replacement.

Extensions are now unable to do such thing and as such we dropped a feature without any replacement while refactoring the icon utility.


Files

users.png (17.6 KB) users.png Xavier Perseguers, 2016-01-02 10:13

Related issues 1 (0 open1 closed)

Follows TYPO3 Core - Task #69057: Deprecate IconUtility::getSpriteIconForFile()ClosedFrank Nägler2015-08-14

Actions
Actions #1

Updated by Markus Klein almost 9 years ago

  • Assignee set to Frank Nägler

Frank can you check on that?

Actions #2

Updated by Frank Nägler almost 9 years ago

  • Status changed from New to Needs Feedback

Thanks for the report.

Do you agree that we need the following things?

  1. Solution to manipulate \TYPO3\CMS\Core\Imaging\IconFactory::$overlayPriorities
  2. Solution to manipulate \TYPO3\CMS\Core\Imaging\IconFactory::$recordStatusMapping
  3. Solution (Hook/Signal) to overwrite the calculated iconName in \TYPO3\CMS\Core\Imaging\IconFactory::mapRecordTypeToOverlayIdentifier() before returning the iconName

If you agree, I will take care of this three things.

Actions #3

Updated by Xavier Perseguers almost 9 years ago

Yes I agree.

Regarding the hook/signal, I'd tend for a hook because the concept of signal is misused in core and should only be for signaling something, not to modify data or use something in return.

A way to modify the hard-coded fields could be to have additional hooks with internal getters (to be used afterwards), just an idea.

Actions #4

Updated by Frank Nägler almost 9 years ago

Fully agree, a hook is the way to go to manipulate this data.

My idea is to move the both arrays $overlayPriorities and $recordStatusMapping to our configuration and remove the hardcoded arrays.

This way, it is possible to define the default values and extend it very easy with custom values.

Actions #5

Updated by Gerrit Code Review almost 9 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45552

Actions #6

Updated by Gerrit Code Review almost 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45552

Actions #7

Updated by Gerrit Code Review almost 9 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45808

Actions #8

Updated by Frank Nägler almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #9

Updated by Gerrit Code Review almost 9 years ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45808

Actions #10

Updated by Frank Nägler almost 9 years ago

  • Status changed from Under Review to Resolved
Actions #11

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF