Review main Merged

65401[TASK] Migrate RecordListController hooks to an PSR-14 event

Daniel Windloff CR +2 V +2 Hard +260 −81 updated 08/30/20, 15:29

Commit message

The following hooks in the RecordListController are used to add
additional content above or below the main controller content:

*  $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']
   ['recordlist/Modules/Recordlist/index.php']['drawHeaderHook']
*  $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']
   ['recordlist/Modules/Recordlist/index.php']['drawFooterHook']

As this functionality could be useful, it should be migrated to a
PSR-14 event. Both hook implementations use a meaningful parameter
set (the request object) and return the additional content as string.
As there is no dependency to the parent object (the class instance of
the class where the hooks are placed), they could be migrated to a
psr-14 event without a breaking change.
Therefore, a PSR-14 event has been implemented to replace the hook
functionality. An event listener has been created to provide a
compatibility layer for both hooks. This allows a proper deprecation
without breaking the hooks.
The event listener (compatibility layer) could be removed in later
versions without any changes in the controller class.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 10