89941[FEATURE] Add event to change the record data in list view
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Garvin Hicking +1
-
Verified V +2 Done
- Benni Mack +2
- Garvin Hicking +1
- core-ci +1 CI
Issues 2
Files 5
- typo3/sysext/backend/Classes/RecordList/Event/AfterRecordListRowPreparedEvent.php3new+82 −0
- typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php15+12 −5
- typo3/sysext/backend/Tests/Functional/RecordList/DatabaseRecordListTest.php+50 −1
- typo3/sysext/backend/Tests/Unit/RecordList/Event/AfterRecordListRowPreparedEventTest.phpnew+127 −0
- typo3/sysext/core/Documentation/Changelog/14.2/Feature-107003-AddEventToChangeRecordDataInListView.rst5new+66 −0
Review log 5469
Show 3544 earlier messages
-
Simon Schaufelberger uploaded patch set 1 06/29/25, 18:32
-
core-ci voted on patch set 1 V +1 06/29/25, 18:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81115
-
Simon Schaufelberger uploaded patch set 2
V +106/29/25, 18:55 -
Simon Schaufelberger uploaded patch set 3 06/29/25, 18:57
-
core-ci voted on patch set 3 V +1 06/29/25, 19:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81117
-
core-ci voted on patch set 2 V +1 06/29/25, 19:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81116
-
Georg Ringer commented on patch set 3 CR -1 06/30/25, 08:30
Feature-107003-AddEventToChangeTitleLinkInListView.rst:23see e.g. 99409, instead of services.yaml we now use #[AsEventListener -
Simon Schaufelberger commented on patch set 3 06/30/25, 09:13
ModifyRecordListRecordTitleEvent.php:57ReplyI have inspired myself from the ModifyRecordListTableActionsEvent where there is also the TODO. what do you think? -
Georg Ringer commented on patch set 3 06/30/25, 12:34
ModifyRecordListRecordTitleEvent.php:57Replywon't give a -1 for that one, there is no right or wrong IMHO -
Simon Schaufelberger uploaded patch set 4
CR -1V +106/30/25, 16:46 -
Simon Schaufelberger commented on patch set 4 06/30/25, 16:46
Feature-107003-AddEventToChangeTitleLinkInListView.rst:23ReplyDone -
Simon Schaufelberger commented on patch set 4 06/30/25, 16:46
ModifyRecordListRecordTitleEvent.php:57ReplyAcknowledged -
core-ci voted on patch set 4 V +1 06/30/25, 16:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81146
-
Georg Ringer voted on patch set 4 CR +1 V +1 06/30/25, 17:32
-
Garvin Hicking commented on patch set 4 06/30/25, 18:37
Feature-107003-AddEventToChangeTitleLinkInListView.rst:33Is this really any kind of raw HTML? If so, this variable name might need to reflect that. otherwise I would supply a link to it like "https://example.com/xyz" and wouldn't think I need to add the whole HTML construct. Also this might lead people into injecting any kind of HTML here so maybe instead we should really only allow links and build the HTML outside? -
Simon Schaufelberger commented on patch set 4 06/30/25, 18:48
Feature-107003-AddEventToChangeTitleLinkInListView.rst:33ReplyThis event works exactly the same like the ModifyRecordListTableActionsEvent where you also have to pass a new link like this: ``` $iconIdentifier = 'actions-open'; $editLink = $this->uriBuilder->buildUriFromRoute('web_layout', $parameters); $editAction = '<a class="btn btn-default" href="' . htmlspecialchars((string) $editLink) . '"' . ' title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:edit')) . '">' . $this->iconFactory->getIcon($iconIdentifier, IconSize::SMALL)->render() . '</a>'; $event->setAction($editAction, 'edit', 'primary'); ``` -
Simon Schaufelberger commented on patch set 4 06/30/25, 18:52
Feature-107003-AddEventToChangeTitleLinkInListView.rst:33Replyor should I also name the property "action"? -
Garvin Hicking commented on patch set 4 07/01/25, 12:36
Feature-107003-AddEventToChangeTitleLinkInListView.rst:33ReplyThat would help me as a reader to understand that it's not just a URL, but a whole HTML tag. Could you maybe describe your use case for adjusting the link? The TCA title/label userfunc adjusts the title, but I wonder which kind of link adjustment you do. My question aims towards that firing this event might have some performance implications, and I wonder if instead me might want to have some other kind of integration here. I guess the "proper" goal could be to make the whole output templateable, and other place at some point may also want to be changed (like custom warnings - and all the actions for controls, translations etc. might also want to be customized). So I wonder if we should just throw events at this or look at the bigger picture. I'm not blocking this, but personally I'm afraid this change might have a too narrowly set focus. -
Simon Schaufelberger commented on patch set 4 07/01/25, 13:33
Feature-107003-AddEventToChangeTitleLinkInListView.rst:33ReplyMy usecase is the following: I'm using https://docs.typo3.org/p/georgringer/news/12.3/en-us/Addons/NewsContentElements/Index.html which provides a standard page module to edit content elements within a news record. Instead of clicking through the news record -> Content Elements -> Link to Page module, I want to directly link to the "news page module" from the TYPO3 List module. Currently this only works for the edit button but not for the title link. I'm open for a better solution and I guess Georg can also help here as he created the extension ;) -
Oli Bartsch commented on patch set 4 07/02/25, 11:30
On the first look, this seems like a limitation of the `clickTitleMode` TSconfig option. What do you think about adding it to this API instead? -
Oli Bartsch commented on patch set 4 07/02/25, 11:32
ModifyRecordListRecordTitleLinkEvent.php:59Actually, we’ve decided not to include entire instances in events anymore (as was previously done for hooks). Which specific information is actually needed for the use cases? Let’s identify and add only those. -
Simon Schaufelberger commented on patch set 4 07/02/25, 12:01
Reply
From my understanding clickTitleMode would be applied to all records, or? I only want it for news records. Additionally, I need to be able to define my own link which will become difficult with this option. what do you think?ModifyRecordListRecordTitleLinkEvent.php:59ReplyI personally don't need it. I just copied it over from ModifyRecordListTableActionsEvent. I'm fine dropping it. -
Simon Schaufelberger commented on patch set 4 07/02/25, 12:07
ModifyRecordListRecordTitleLinkEvent.php:59ReplyNo, sorry, I would actually need it for: `'returnUrl' => $event->getRecordList()->listURL(),` -
Simon Schaufelberger uploaded patch set 5
CR +1V +108/07/25, 18:59 -
core-ci voted on patch set 5 V +1 08/07/25, 19:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82875
-
Simon Schaufelberger uploaded patch set 6
V +108/07/25, 19:57 -
Simon Schaufelberger uploaded patch set 7 08/07/25, 20:00
-
Georg Ringer commented on patch set 7 CR +1 V +1 08/07/25, 20:01
ModifyRecordListRecordTitleLinkEvent.php:59Replyas DatabaseRecordList is currently still a bit a mess and having access to it is really helpful/needed and because the event is in sync with the other events I opt for having that in thereFeature-107003-AddEventToChangeTitleLinkInListView.rst:33ReplyDone -
core-ci voted on patch set 6 V +1 08/07/25, 20:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82904
-
core-ci voted on patch set 7 V +1 08/07/25, 20:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82905
-
Oli Bartsch commented on patch set 7 CR -1 08/07/25, 20:42
Reply
Oke seems valid.DatabaseRecordList.php:2768Please don't pass the whole class to the event. We tried to avoid this when migrating from hooks to events. So only add context, which is really needed. Otherwise we make make internal API public. -
Simon Schaufelberger commented on patch set 7 08/07/25, 23:24
DatabaseRecordList.php:2768Replythis IS currently already happening in ModifyRecordListTableActionsEvent. the new Event is in sync with the other one and I need an API to get the link back to the list module -
Simon Schaufelberger commented on patch set 7 08/07/25, 23:27
DatabaseRecordList.php:2768Replyas you can see,the other event was also not well designed from the beginning. any suggestions? -
Simon Schaufelberger uploaded patch set 8
CR +1V +108/08/25, 11:46 -
core-ci voted on patch set 8 V +1 08/08/25, 11:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83011
-
Benni Mack commented on patch set 8 08/08/25, 16:56
DatabaseRecordList.php:2768ReplyLet's place the new event at a place that supersedes the existing ModifyRecordListTableActionsEvent and also allows to do much more than this current proposal. -
Simon Schaufelberger commented on patch set 8 08/09/25, 22:48
DatabaseRecordList.php:2768Reply@benni@typo3.org Can you please specify what I should do? -
Benni Mack commented on patch set 8 08/29/25, 14:45
DatabaseRecordList.php:2768ReplyHere is the guide to this: 1. Let's migrate to Record API https://review.typo3.org/c/Packages/TYPO3.CMS/+/90405 2. Introduce Objects for the LinkActions see https://review.typo3.org/c/Packages/TYPO3.CMS/+/90383 3. We introduce a new PSR-14 event (= this change) that receives a LinkAction which can then be overridden. -
Simon Schaufelberger commented on patch set 8 11/20/25, 10:21
DatabaseRecordList.php:2768Reply@benni@typo3.org Since the second point got abandoned, can we move forward here somehow? -
Oli Bartsch commented on patch set 8 11/20/25, 10:26
DatabaseRecordList.php:2768ReplyI think this was done with https://review.typo3.org/c/Packages/TYPO3.CMS/+/91288 instead. -
Simon Schaufelberger commented on patch set 8 12/18/25, 21:12
DatabaseRecordList.php:2768Reply@benni@typo3.org I would like to bring this into v14 so I can use the event it in my extension. Can you please let me know if I should wait for some bigger refactoring or if I should adjust something to make it ready to be merged? -
Benni Mack commented on patch set 8 CR -1 12/19/25, 08:04
DatabaseRecordList.php:2768ReplyHey. with all the pre-work now in place, this patch can now move on. That said: I suggest adding an Event in renderListRow() just before addData() so it is possible to manipulate all cells of a row, and not just the title. -
Simon Schaufelberger uploaded patch set 9
CR -1V +112/21/25, 22:34 -
core-ci voted on patch set 9 V +1 12/21/25, 22:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92560
-
Simon Schaufelberger commented on patch set 9 12/21/25, 22:46
DatabaseRecordList.php:2768ReplyI implemented a completely new version of the event now and I'm open for feedback. One thing I didn't like is that there is no full record row entry available where everything is inside, that is why I'm passing the title separately, otherwise the user would need to fetch it again which doubles the sql queries. The same with the lockInfo. In my opinion this should not be part of the title. -
Simon Schaufelberger uploaded patch set 10
V +101/23/26, 12:43 -
Simon Schaufelberger commented on patch set 10 01/23/26, 12:46
DatabaseRecordList.php:2768Reply@benni@typo3.org can you please have a look at this patch now? the new event is also covered with a test. -
core-ci voted on patch set 10 V +1 01/23/26, 12:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94170
-
Benni Mack commented on patch set 10 02/07/26, 11:54
DatabaseRecordList.php:2768ReplyPatch looks fine. IMHO I think we could hand over the DatabaseRecordList object completely instead of the one public property you currently need. -
Benni Mack uploaded patch set 11
V +102/08/26, 09:34 -
Benni Mack commented on patch set 11 02/08/26, 09:35
DatabaseRecordList.php:2768ReplyHey Oli, I think in this case, the whole class with so many public properties is indeed much more useful than in the other cases. IMHO this patch is now ready for me now. -
core-ci voted on patch set 11 V +1 02/08/26, 09:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95401
-
Benni Mack rebased onto patch set 12
V +102/18/26, 14:42 -
core-ci voted on patch set 12 V +1 02/18/26, 14:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96154
-
Oli Bartsch commented on patch set 12 02/18/26, 15:08
DatabaseRecordList.php:2768ReplyYes fine for me. -
Oli Bartsch commented on patch set 12 02/18/26, 15:12
AfterRecordListRowPreparedEvent.php:58Should be `?string`. Interesting phpstan does not report this.Feature-107003-AddEventToChangeRecordDataInListView.rst:17it also allows to change tag attributes. Maybe just list all methods with poroper description here. -
Simon Schaufelberger uploaded patch set 13
V +102/18/26, 16:18 -
Simon Schaufelberger commented on patch set 12 02/18/26, 16:19
AfterRecordListRowPreparedEvent.php:58ReplyThat is only detected with level 8.Feature-107003-AddEventToChangeRecordDataInListView.rst:17Replyok or too many details? -
Simon Schaufelberger commented on patch set 13 02/18/26, 16:21
AfterRecordListRowPreparedEvent.php:58Replywe are on level 5 only. -
Simon Schaufelberger uploaded patch set 14 02/18/26, 16:41
-
core-ci voted on patch set 14 V +1 02/18/26, 16:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96175
-
core-ci voted on patch set 13 V +1 02/18/26, 16:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96170
-
Garvin Hicking commented on patch set 14 CR +1 V +1 02/20/26, 21:37
Feature-107003-AddEventToChangeRecordDataInListView.rst:17ReplyLet's keep it like that. The "data" array is so obfuscated, everyone will most likely just xdebug/print_r inspect it, and not look here in the docs. -
Benni Mack updated the commit message in patch set 15
CR +1V +102/20/26, 21:51 -
Simon Schaufelberger commented on patch set 15 02/20/26, 21:57
Feature-107003-AddEventToChangeRecordDataInListView.rst:17ReplyChances are low that somebody will actually use this event except me 😄 I just want to link to some other module -
Garvin Hicking commented on patch set 15 CR +1 V +1 02/20/26, 22:01
Feature-107003-AddEventToChangeRecordDataInListView.rst:17ReplyPsssh, don't hint other people at that we're doing this JUST FOR YOU -
core-ci voted on patch set 15 V +1 02/20/26, 22:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96410
-
Benni Mack voted on patch set 15 CR +2 V +2 02/20/26, 22:04
-
Benni Mack merged patch set 16 02/20/26, 22:04
ModifyRecordListRecordTitleEvent.php:57