#110435PSR-14 event to render additional content in the filelist module
Description
`RenderAdditionalContentToRecordListEvent` allows extensions to render content above and below the record list. The filelist module has no equivalent. `FileListController` does not dispatch any event at all and has no `EventDispatcherInterface` injected.
This is an inconsistency rather than a missing feature in one specific place: the page module, the record list and (with the proposal in #110434 ) the edit form all offer a way to contribute content, the file module does not. Extensions that decorate backend modules consistently have to special case the filelist and fall back to response manipulation.
Use case: EXT:xima_typo3_content_planner renders editorial status information in the page module, the record list and the edit form. For the filelist it uses a middleware for that single case.
Proposal: `RenderAdditionalContentToFileListEvent`, modelled directly on `RenderAdditionalContentToRecordListEvent` (`getAdditionalContentAbove()` / `setAdditionalContentAbove()`, same for below), dispatched in `FileListController::processRequest()` and assigned to the template as `additionalContentTop` / `additionalContentBottom`.
Open question for the patch: `FileListController` has a second, earlier return in `handleRequest()` for the case where the folder object is null (invalid request or missing permissions). Whether the event should fire there as well is a design decision, dispatching only in `processRequest()` is the simpler option.
I am willing to provide the patch.
Reviews 1
Related issues 1
History 25
-
Konrad Michalik changed Related to #110434 <span data-processor="relativetime" data-value="2026-08-11T10:34:49+00:00" > 08/11/26, 10:34 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 95290 status
NewUnder Review <span data-processor="relativetime" data-value="2026-08-12T12:04:12+00:00" > 08/12/26, 12:04 </span> -
Konrad Michalik commented <span data-processor="relativetime" data-value="2026-08-12T12:43:59+00:00" > 08/12/26, 12:43 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 95290 <span data-processor="relativetime" data-value="2026-08-14T18:00:12+00:00" > 08/14/26, 18:00 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 95290 <span data-processor="relativetime" data-value="2026-09-17T14:47:33+00:00" > 09/17/26, 14:47 </span>
Two deviations from the proposal above, plus one finding worth recording.
Naming : the event is called
BeforeFileListIsRenderedEvent, notRenderAdditionalContentToFileListEvent. Of the event classes added to Core since mid-2025, eleven use aBeforeand seven anAfterprefix, while none follows the older pattern ofRenderAdditionalContentToRecordListEvent, which stems from the v11 hook migration. The decisive argument was the neighbouring class in the same directory:AfterFileListRowPreparedEventalready follows the current scheme, so mirroring the record list name would have made the new event the outlier in its own namespace.The event carries the folder . Besides the request it exposes
getFolder(): Folder. Without it, every listener has to read theidquery parameter and resolve it throughStorageRepositoryitself. The getter is not nullable, because the dispatch sits inprocessRequest()andhandleRequest()returns earlier when no folder could be resolved. Listeners therefore need no null check.That early return also answers the open question above. The event fires only when a folder is actually displayed, not for invalid requests or missing read permissions. In those cases the module renders an empty container plus a flash message, so there would be no folder for a listener to relate its content to. This matches
RecordListController, which likewise dispatches only in its normal path.One qualification on the use case : for the file list the new event covers less than the equivalent events do in the other modules. EXT:xima_typo3_content_planner can replace its folder status header with a listener, but the status dropdowns it injects into individual rows need
AfterFileListRowPreparedEventinstead. Both together remove the need for response manipulation in this module, while this patch alone reduces it.The additional content is rendered below the module headline and around the listing, mirroring the position of
additionalContentTopandadditionalContentBottomin the record list. Escaping dynamic values is the responsibility of the listener, since the content is rendered as raw markup. A functional test and a changelog entry are included.