Project

General

Profile

Actions

Feature #15267

closed

t3lib_extMgm::addModule() and sorting of BE-Modules

Added by Peter Niederlag over 18 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2005-12-09
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Roadmap:Phoenix

Adding new Main-modules to the Main-menu there is no API to influence the order of the modules/menuentries.

There is a solution around, that is provided by EXT:dam like this:

--------------------------------------------------------------------------------
$temp_TBE_MODULES = Array();

foreach($TBE_MODULES AS $key => $val) {
if ($key == 'doc') {
$temp_TBE_MODULES[$key] = $val;
$temp_TBE_MODULES['mod_1'] = $val;
} else {
$temp_TBE_MODULES[$key] = $val;
}
}
$TBE_MODULES = $temp_TBE_MODULES;
-----------------------------------------------------------------

This possibilty should be usable by the t3lib::extMgm-API.

I think it will stay for 4.0 as is.
Should be fixed/taken care of in 4.5/5.0.

(issue imported from #M2016)

Actions #1

Updated by Tapio Markula over 16 years ago

The problem of that solution is that it doesn't take account other modules than 'doc', which don't have submodules
Here is proper configuration system for resetting TBE_MODULES

$temp_TBE_MODULES = Array();
// configuration - $tbemodules should be replaced with some reasonalbe configuration in plugin config and TS config for users/user groups.
$tbemodules='web|layout,template;file;doc;user;tools';
$tbemodules = t3lib_div::trimExplode(';',strtolower($tbemodules),1);
foreach($tbemodules AS $key => $val) {
t3lib_div::debug($val);
if(strstr($val,"|")) {
$valSplit = explode("|",$val);
$temp_TBE_MODULES[$valSplit0]=$valSplit1;
}
else $temp_TBE_MODULES[$val]=''; }

$TBE_MODULES=$temp_TBE_MODULES;

The format is ok, but that misses access check.
It just reset the array $TBE_MODULES on the base of some confiugation. This works fine with modules, which don't have submodules - not just the module 'doc'!

The array has been called
$loadModules->load($TBE_MODULES);

but I don't know, if the load function makes access check or if the access check should be done somewhat inside the foreach loop.

Actions #2

Updated by Christian Weiske almost 13 years ago

  • Target version deleted (0)
  • % Done changed from 0 to 100

TYPO3 since at least 4.3 has the possibility to set the order of submodules:

public static function addModule($main, $sub = '', $position = '', $path = '')

I think this bug can be closed.

Actions #3

Updated by Stefan Galinski about 11 years ago

  • Status changed from New to Closed
  • TYPO3 Version changed from 3.9-dev to 4.0
  • PHP Version deleted (4)
Actions

Also available in: Atom PDF