Index: typo3/backend.php =================================================================== --- typo3/backend.php (Revision 7584) +++ typo3/backend.php (Arbeitskopie) @@ -145,6 +145,8 @@ if (isset($GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW']) && (int) $GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW'] != (int) $this->menuWidth) { $this->menuWidth = (int) $GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW']; } + + $this->executeHook('constructPostProcess'); } /** @@ -182,6 +184,7 @@ * @return void */ public function render() { + $this->executeHook('renderPreProcess'); // prepare the scaffolding, at this point extension may still add javascript and css $logo = t3lib_div::makeInstance('TYPO3Logo'); @@ -255,6 +258,8 @@ $this->content .= $backendScaffolding; $this->content .= $GLOBALS['TBE_TEMPLATE']->endPage(); + $this->executeHook('renderPostProcess'); + echo $this->content; } @@ -677,6 +682,23 @@ unset($toolbarItem); } } + + /** + * Executes defined hooks functions for the given identifier. + * + * @param string $identifier Specific hook identifier + * @return void + */ + protected function executeHook($identifier) { + $options =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php']; + + if(isset($options[$identifier]) && is_array($options[$identifier])) { + foreach($options[$identifier] as $hookFunction) { + $hookConfiguration = array(); + t3lib_div::callUserFunction($hookFunction, $hookConfiguration, $this); + } + } + } }