Project

General

Profile

Feature #18063 » bug7293-hookInModuleMenu-againstRev2973.patch

Administrator Admin, 2008-01-28 13:09

View differences:

typo3/alt_menu.php (working copy)
$this->content.=$TBE_TEMPLATE->startPage('Vertical Backend Menu');
$backPath = $GLOBALS['BACK_PATH'];
// Printing the menu
// Printing the menu
$alt_menuObj = t3lib_div::makeInstance('alt_menu_functions');
$this->content.= $alt_menuObj->topMenu($this->loadModules->modules);
$theMods = $this->loadModules->modules;
// Hook: Allow to process modules array before returning it for rendering
$hookObjectsArr = array();
if (is_array ($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/alt_menu.php']['preProcessModulesArrayBeforeRendering'])) {
foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/alt_menu.php']['preProcessModulesArrayBeforeRendering'] as $classRef) {
$hookObjectsArr[] = t3lib_div::getUserObj($classRef);
}
}
reset($hookObjectsArr);
while (list(,$hookObj) = each($hookObjectsArr)) {
if (method_exists($hookObj,'preProcessModulesArrayBeforeRendering')) {
$theMods = $hookObj->preProcessModulesArrayBeforeRendering($theMods);
}
}
$this->content.= $alt_menuObj->topMenu($theMods);
// clear cache commands for Admins
if($BE_USER->isAdmin()) { // && $BE_USER->workspace===0 NOT used anyway because under a workspace developers might still like to clear cache!
typo3/classes/class.modulemenu.php (working copy)
*/
public function getRawModuleData() {
$modules = array();
global $TYPO3_CONF_VARS;
$loadedModules = $this->loadedModules;
// Hook: Allow to process modules array before returning it for rendering
$hookObjectsArr = array();
if (is_array ($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/classes/class.modulemenu.php']['preProcessModulesArrayBeforeRendering'])) {
foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/classes/class.modulemenu.php']['preProcessModulesArrayBeforeRendering'] as $classRef) {
$hookObjectsArr[] = t3lib_div::getUserObj($classRef);
}
}
reset($hookObjectsArr);
while (list(,$hookObj) = each($hookObjectsArr)) {
if (method_exists($hookObj,'preProcessModulesArrayBeforeRendering')) {
$loadedModules = $hookObj->preProcessModulesArrayBeforeRendering($loadedModules);
}
}
// Remove the 'doc' module?
if($GLOBALS['BE_USER']->getTSConfigVal('options.disableDocModuleInAB')) {
unset($this->loadedModules['doc']);
unset($loadedModules['doc']);
}
foreach($this->loadedModules as $moduleName => $moduleData) {
foreach($loadedModules as $moduleName => $moduleData) {
$moduleNavigationFramePrefix = $this->getNavigationFramePrefix($moduleData);
if($moduleNavigationFramePrefix) {
(3-3/3)