ModifyDatabaseQueryForContentEvent

New in version 12.0: The PSR-14 event TYPO3\CMS\Backend\View\Event\ModifyDatabaseQueryForContentEvent has been introduced which serves as a drop-in replacement for the removed $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][PageLayoutView::class]['modifyQuery'] hook.

Use this event to filter out certain content elements from being shown in the Page module.

API

class TYPO3\CMS\Backend\View\Event\ModifyDatabaseQueryForContentEvent

Use this Event to alter the database query when loading content for a page.

getQueryBuilder()
Return type

TYPO3\CMS\Core\Database\Query\QueryBuilder

setQueryBuilder(TYPO3\\CMS\\Core\\Database\\Query\\QueryBuilder $queryBuilder)
Parameters
  • $queryBuilder (TYPO3\CMS\Core\Database\Query\QueryBuilder) -- the queryBuilder

getTable()
Return type

string

getPageId()
Return type

int