Currently I'm trying to create a module group in the typo3 backend module list on the left hand side. My group works fine for modules within the same extension. But when I try to add modules from other extensions to it, it simply doesn't work.
I have created this Module group (mainmodule
) in the ext_tables.php
file in one of my other extensions like this:
/**
* Creates a Backend Module Category
*/
$GLOBALS['TBE_MODULES'] = array_slice($GLOBALS['TBE_MODULES'], 0, 1, true) +
['mainmodule' => ''] +
array_slice($GLOBALS['TBE_MODULES'], 1, count($GLOBALS['TBE_MODULES']) - 1, true);
$GLOBALS['TBE_MODULES']['_configuration']['mainmodule'] = [
'iconIdentifier' => 'module',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_myExt.xlf:mlang_key',
'name' => 'mainmodule',
];
I'm trying to use the mainmodule in a different extension as follows:
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'VEN.' . $extKey,
'mainmodule', // Make module a submodule of 'mainmodule'
'randomkey', // Submodule key
'',
...
The module is always created inside its "own" mainmodule.
I have tried all of the solutions given here on stackoverflow and spent hours of trying to solve this issue. I just can't get it to work..