87860[FEATURE] Provide event for additional file controls
Commit message
Review
-
Code review CR +2 Done
- Georg Ringer +2
- Sebastian Michaelsen +1
- Garvin Hicking +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Georg Ringer +2
- Garvin Hicking +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 4
- typo3/sysext/backend/Classes/Form/Container/FilesControlContainer.php9+6 −1
- typo3/sysext/backend/Classes/Form/Event/CustomFileSelectorsEvent.phpnew+88 −0
- typo3/sysext/backend/Tests/Functional/Form/Container/FilesControlContainerTest.php2+52 −0
- typo3/sysext/core/Documentation/Changelog/14.2/Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst16new+80 −0
Review log 4053
Show 2228 earlier messages
-
Georg Ringer uploaded patch set 1 01/22/25, 22:08
-
core-ci voted on patch set 1 V -1 01/22/25, 22:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72888
-
Hannes Lau commented on patch set 1 04/03/25, 17:04
Hi @georg.ringer@gmail.com! Thank you for looking into this topic! For the cloudinary extension, we helped ourselfs with a very similar approach: Override control container to add event dispatch https://github.com/visol/ext-cloudinary/blob/feature/v12/Classes/Backend/Form/Container/FilesControlContainer.php Custom event https://github.com/visol/ext-cloudinary/blob/feature/v12/Classes/Events/CustomFileSelectorsEvent.php Event listener to add custom controls: https://github.com/visol/ext-cloudinary/blob/feature/v12/Classes/EventHandlers/CustomFileSelectorsEventHandler.php We did not need tableName, fieldName and databaseRow, but it sure will not hurt to have them. The fileExtensionFilter may be important to pass, so the file browser can limit the selectable files. -
Georg Ringer uploaded patch set 2
V -104/03/25, 20:15 -
core-ci voted on patch set 2 V +1 04/03/25, 20:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76970
-
Georg Ringer commented on patch set 2 04/03/25, 20:39
This change is ready for review. -
Hannes Lau commented on patch set 2 CR +1 04/03/25, 21:48
Reply
Done -
Hannes Lau commented on patch set 2 CR 0 04/04/25, 07:41
Would it be possible to add the new event to 13 as well?FilesControlContainer.php:417I just tried to verify the patch, but failed. Instead of passing the `$currentStructureDomObjectIdPrefix`, it might be better to store the `$objectPrefix` (data-file-irre-object) in the event. The API action `typo3:foreignRelation:insert` expects the `$objectPrefix` in the `objectGroup` parameter to add new files to the relation. -
Georg Ringer commented on patch set 2 04/04/25, 07:55
@office@hanneslau.de even if that would be very nice, we have currently the policy that regular features are not merged into LTS releases. Sorry for that, would love to see it sometimes differently as well -
Andreas Kienast commented on patch set 2 04/04/25, 08:11
FilesControlContainer.php:327Why do we rename this? A selector is, from a technical POV, a describer to select one or more elements. -
Hannes Lau commented on patch set 2 04/04/25, 08:12
Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:55```suggestion $event->getFormFieldIdentifier(), ``` -
Georg Ringer rebased onto patch set 3
V +104/07/25, 14:43 -
core-ci voted on patch set 3 V +1 04/07/25, 14:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77150
-
Stefan Froemken commented on patch set 3 04/07/25, 20:04
FilesControlContainer.php:268Remove the spaces -
Stefan Froemken commented on patch set 4
V +104/07/25, 20:08Published edit on patch set 3. -
core-ci voted on patch set 4 V +1 04/07/25, 20:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77164
-
Hannes Lau commented on patch set 4 04/07/25, 22:12
FilesControlContainer.php:268ReplyBut this would be unrelated, right? The patch did not insert or alter that line. -
Stefan Froemken commented on patch set 4 04/08/25, 14:25
FilesControlContainer.php:268ReplyThe two spaces were added with patch-set 2. So, yes, it was inserted by the patch. -
Hannes Lau commented on patch set 4 04/08/25, 15:51
FilesControlContainer.php:268ReplyOh yes, you are right. -
Georg Ringer uploaded patch set 5
V +112/29/25, 18:04 -
core-ci voted on patch set 5 V +1 12/29/25, 18:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92788
-
Josef Glatz commented on patch set 5 01/01/26, 07:06
Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:49Is this somehow related, or is there a more applicable example class name possible? -
Simon Schaufelberger uploaded patch set 6
V +101/01/26, 16:03 -
Simon Schaufelberger commented on patch set 6 CR +1 V +1 01/01/26, 16:04
FilesControlContainer.php:268ReplyDone -
core-ci voted on patch set 6 V +1 01/01/26, 16:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92876
-
Garvin Hicking commented on patch set 6 02/20/26, 09:15
Georg, you want to pick this up? -
Benni Mack commented on patch set 6 02/20/26, 11:22
File must be in a different folder -
Georg Ringer uploaded patch set 7
CR +1V +102/20/26, 17:06
-
core-ci voted on patch set 7 V -1 02/20/26, 17:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96388
-
core-ci voted on patch set 7 V +1 02/20/26, 21:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96388
-
Garvin Hicking commented on patch set 7 02/20/26, 21:59
Reply
Thanks.... you know what comes next.... Could we have a test for the new event, preferrable not just getters/setters, but a verification that controls can actually be added to the output of the FAL list (or is this just the file picker? I never know what filesControlContainer does)Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:14This changelog misses a few details: * WHERE is this added? Which functionality does it affect? * What's a "control"? * What's a "selector"?Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:23```suggestion - :php:`getTableName()`: Get table name of the current record. ```Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:25Raw array? Or Record API?Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:26What "field"? A file field? Probably the TCA configuration of the column that holds a file reference? -
Georg Ringer uploaded patch set 8
V +103/15/26, 08:36 -
Georg Ringer commented on patch set 8 03/15/26, 08:36
FilesControlContainer.php:327ReplyDoneFilesControlContainer.php:417ReplyDoneFeature-105649-NewPSR-14CustomFileSelectorsEvent.rst:14ReplyDoneFeature-105649-NewPSR-14CustomFileSelectorsEvent.rst:23ReplyDoneFeature-105649-NewPSR-14CustomFileSelectorsEvent.rst:25ReplyDoneFeature-105649-NewPSR-14CustomFileSelectorsEvent.rst:26Replythe field using this relation of course -
core-ci voted on patch set 8 V +1 03/15/26, 08:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97965
-
Garvin Hicking commented on patch set 8 CR +1 V +1 03/15/26, 09:04
Reply
DoneFeature-105649-NewPSR-14CustomFileSelectorsEvent.rst:55ReplyDone -
Simon Schaufelberger voted on patch set 8 CR +1 V +1 03/15/26, 15:56
-
Sebastian Michaelsen commented on patch set 8 CR -1 03/16/26, 06:13
FilesControlContainerTest.php:124"myCustomJavsScriptModule" missing an "a"Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:56should be ->getFormFieldIdentifier()Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:59This should be ->getSelectors() and ->setSelectors(), right?Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:63getJavascriptModules() with lower-case "s" -
Georg Ringer uploaded patch set 9
CR +1V +103/17/26, 21:13 -
Georg Ringer commented on patch set 9 03/17/26, 21:13
FilesControlContainerTest.php:124ReplyDone -
Georg Ringer commented on patch set 8 03/17/26, 21:14
Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:56ReplyDoneFeature-105649-NewPSR-14CustomFileSelectorsEvent.rst:59ReplyDoneFeature-105649-NewPSR-14CustomFileSelectorsEvent.rst:63ReplyDone -
core-ci voted on patch set 9 V +1 03/17/26, 21:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98111
-
Sebastian Michaelsen voted on patch set 9 CR +1 03/17/26, 21:32
-
Garvin Hicking voted on patch set 9 CR +1 V +1 03/18/26, 05:55
-
Josua Vogel commented on patch set 9 CR -1 03/18/26, 07:35
Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:68This example is broken ;) constructor belongs inside the class and the class itself needs a better name -
Georg Ringer uploaded patch set 10
CR +1V +103/18/26, 18:11 -
core-ci voted on patch set 10 V -1 03/18/26, 18:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98211
-
core-ci commented on patch set 10 03/18/26, 22:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98211
-
core-ci voted on patch set 10 V +1 03/19/26, 07:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98211
-
Garvin Hicking commented on patch set 10 CR +1 V +1 03/19/26, 08:06
Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:68ReplyDone -
Sebastian Michaelsen voted on patch set 10 CR +1 03/19/26, 09:06
-
Simon Schaufelberger voted on patch set 10 CR +1 V +1 03/24/26, 21:58
-
Georg Ringer voted on patch set 10 CR +2 V +2 03/24/26, 22:05
-
Georg Ringer merged patch set 11 03/24/26, 22:05