Review main Merged

87860[FEATURE] Provide event for additional file controls

Georg Ringer CR +2 V +2 Normal +226 −1 updated 03/24/26, 22:05

Commit message

Add an event which makes it easier for extension developers to
provide an integration of DAM systems.

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

Review log 4053

Show 2228 earlier messages
  1. Georg Ringer uploaded patch set 1 01/22/25, 22:08

  2. 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

  3. 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.
  4. Georg Ringer uploaded patch set 2 V -1 04/03/25, 20:15

  5. 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

  6. Georg Ringer commented on patch set 2 04/03/25, 20:39

    This change is ready for review.
  7. Hannes Lau commented on patch set 2 CR +1 04/03/25, 21:48

    Reply

    Done
  8. 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:417

    I 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.
  9. 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
  10. Andreas Kienast commented on patch set 2 04/04/25, 08:11

    FilesControlContainer.php:327

    Why do we rename this? A selector is, from a technical POV, a describer to select one or more elements.
  11. Hannes Lau commented on patch set 2 04/04/25, 08:12

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:55

    ```suggestion $event->getFormFieldIdentifier(), ```
  12. Georg Ringer rebased onto patch set 3 V +1 04/07/25, 14:43

  13. 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

  14. Stefan Froemken commented on patch set 3 04/07/25, 20:04

    FilesControlContainer.php:268

    Remove the spaces
  15. Stefan Froemken commented on patch set 4 V +1 04/07/25, 20:08

    Published edit on patch set 3.
  16. 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

  17. Hannes Lau commented on patch set 4 04/07/25, 22:12

    FilesControlContainer.php:268 Reply

    But this would be unrelated, right? The patch did not insert or alter that line.
  18. Stefan Froemken commented on patch set 4 04/08/25, 14:25

    FilesControlContainer.php:268 Reply

    The two spaces were added with patch-set 2. So, yes, it was inserted by the patch.
  19. Hannes Lau commented on patch set 4 04/08/25, 15:51

    FilesControlContainer.php:268 Reply

    Oh yes, you are right.
  20. Georg Ringer uploaded patch set 5 V +1 12/29/25, 18:04

  21. 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

  22. Josef Glatz commented on patch set 5 01/01/26, 07:06

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:49

    Is this somehow related, or is there a more applicable example class name possible?
  23. Simon Schaufelberger uploaded patch set 6 V +1 01/01/26, 16:03

  24. Simon Schaufelberger commented on patch set 6 CR +1 V +1 01/01/26, 16:04

    FilesControlContainer.php:268 Reply

    Done
  25. 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

  26. Garvin Hicking commented on patch set 6 02/20/26, 09:15

    Georg, you want to pick this up?
  27. Benni Mack commented on patch set 6 02/20/26, 11:22

    File must be in a different folder
  28. Georg Ringer uploaded patch set 7 CR +1 V +1 02/20/26, 17:06

  1. 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

  2. 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

  3. 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:14

    This 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:25

    Raw array? Or Record API?

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:26

    What "field"? A file field? Probably the TCA configuration of the column that holds a file reference?
  4. Georg Ringer uploaded patch set 8 V +1 03/15/26, 08:36

  5. Georg Ringer commented on patch set 8 03/15/26, 08:36

    FilesControlContainer.php:327 Reply

    Done

    FilesControlContainer.php:417 Reply

    Done

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:14 Reply

    Done

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:23 Reply

    Done

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:25 Reply

    Done

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:26 Reply

    the field using this relation of course
  6. 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

  7. Garvin Hicking commented on patch set 8 CR +1 V +1 03/15/26, 09:04

    Reply

    Done

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:55 Reply

    Done
  8. Simon Schaufelberger voted on patch set 8 CR +1 V +1 03/15/26, 15:56

  9. 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:56

    should be ->getFormFieldIdentifier()

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:59

    This should be ->getSelectors() and ->setSelectors(), right?

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:63

    getJavascriptModules() with lower-case "s"
  10. Georg Ringer uploaded patch set 9 CR +1 V +1 03/17/26, 21:13

  11. Georg Ringer commented on patch set 9 03/17/26, 21:13

    FilesControlContainerTest.php:124 Reply

    Done
  12. Georg Ringer commented on patch set 8 03/17/26, 21:14

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:56 Reply

    Done

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:59 Reply

    Done

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:63 Reply

    Done
  13. 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

  14. Sebastian Michaelsen voted on patch set 9 CR +1 03/17/26, 21:32

  15. Garvin Hicking voted on patch set 9 CR +1 V +1 03/18/26, 05:55

  16. Josua Vogel commented on patch set 9 CR -1 03/18/26, 07:35

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:68

    This example is broken ;) constructor belongs inside the class and the class itself needs a better name
  17. Georg Ringer uploaded patch set 10 CR +1 V +1 03/18/26, 18:11

  18. 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

  19. 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

  20. 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

  21. Garvin Hicking commented on patch set 10 CR +1 V +1 03/19/26, 08:06

    Feature-105649-NewPSR-14CustomFileSelectorsEvent.rst:68 Reply

    Done
  22. Sebastian Michaelsen voted on patch set 10 CR +1 03/19/26, 09:06

  23. Simon Schaufelberger voted on patch set 10 CR +1 V +1 03/24/26, 21:58

  24. Georg Ringer voted on patch set 10 CR +2 V +2 03/24/26, 22:05

  25. Georg Ringer merged patch set 11 03/24/26, 22:05