Project

General

Profile

Task #5097 ยป menu_config.diff

Xavier Perseguers, 2009-10-25 11:44

View differences:

Classes/MVC/Controller/ActionController.php (working copy)
protected $errorMethodName = 'errorAction';
/**
* The module menu items array. Each key represents a key for which values can range between the items in the array of that key.
* @var array
* @see initializeModuleMenu()
* @api
*/
protected $moduleMenu = array(
'function' => array()
);
/**
* Injects the reflection service
*
* @param Tx_Extbase_Reflection_Service $reflectionService
......
}
/**
* Initializes the module function menu before invoking an action method.
*
* Override this method if your extension provides a function menu.
*
* @param string $moduleName
* @return void
* @api
*/
public function initializeModuleMenu($moduleName) {
}
/**
* Returns the module menu.
*
* @return array
* @see initializeModuleMenu()
* @api
*/
public function getModuleMenu() {
return $this->moduleMenu;
}
/**
* Initializes the controller before invoking an action method.
*
* Override this method to solve tasks which all actions have in
Classes/Dispatcher.php (working copy)
'actionName' => '',
);
$set = t3lib_div::_GP('SET');
if (!$set) {
// Early return
return $controllerAction;
}
$config = $GLOBALS['TBE_MODULES'][$module];
$controller = t3lib_div::makeInstance('Tx_' . $config['extensionName'] . '_Controller_' . $defaultController . 'Controller');
$controller->initializeModuleMenu($module);
$moduleMenu = $controller->getModuleMenu();
$set = t3lib_BEfunc::getModuleData($moduleMenu, t3lib_div::_GP('SET'), $module);
$moduleFunction = $set['function'];
$matches = array();
......
if (isset($functions[$moduleFunction])) {
$controllerAction['controllerName'] = $defaultController;
$controllerAction['actionName'] = 'extObj';
// TODO: !VERY IMPORTANT! find a way to pass $moduleFunction as argument to the extObjAction
}
}
    (1-1/1)