Feature: #98375 - PSR-14 events in Page Module

See forge#98375

Description

Three new PSR-14 events have been added to TYPO3's page module to modify the preparation and rendering of content elements:

  • TYPO3\CMS\Backend\View\Event\IsContentUsedOnPageLayoutEvent

  • TYPO3\CMS\Backend\View\Event\ModifyDatabaseQueryForContentEvent

  • TYPO3\CMS\Backend\View\Event\PageContentPreviewRenderingEvent

They are drop-in replacement to the removed hooks:

  • $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['record_is_used']

  • $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][PageLayoutView::class]['modifyQuery']

  • $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']

Impact

Use IsContentUsedOnPageLayoutEvent to identify if a content has been used in a column that isn't on a Backend Layout.

Use ModifyDatabaseQueryForContentEvent to filter out certain content elements from being shown in the Page Module.

Use PageContentPreviewRenderingEvent to ship an alternative rendering for a specific content type or to manipulate the content elements' record data.