#43451Existing implementation of txCmsLayoutDrawItemHook fails in 6.0
Description
If i implemment the following hook compatible with 4.x i get a fatal PHP-Error. Im running TYPO3 6.0 on php 5.3.6.
Error:
Fatal error: Declaration of tx_t3_default_resources_txCmsLayoutDrawItemHook::preProcess() must be compatible with that of TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface::preProcess() in /Users/martin/Public/localhost/t3_default/www-data/typo3conf/ext/t3_default_resources/Classes/Hooks/txCmsLayoutDrawItemHook.php on line 4
Hook:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']
Old implementation that fails in 6.0:
class tx_t3_default_resources_txCmsLayoutDrawItemHook implements tx_cms_layout_tt_content_drawItemHook {
public function preProcess(tx_cms_layout &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row){
}
}
New namespaced implementation that works but is incompatible with 4.x:
class tx_t3_default_resources_txCmsLayoutDrawItemHook implements \TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface {
public function preProcess(tx_cms_layout &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row){
}
}
So currently it is not possible to implement this hook for 4.x and 6.0.
Regards Martin
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.