Skip to content

Instantly share code, notes, and snippets.

@Lefaux
Last active August 27, 2015 13:59
Show Gist options
  • Save Lefaux/54504d1fe5be77d5752e to your computer and use it in GitHub Desktop.
Save Lefaux/54504d1fe5be77d5752e to your computer and use it in GitHub Desktop.
[Proposal] TYPO3 Module Configuration
<?php
$TYPO3_CONF_VARS = [
'modules' => [
'direct_mail' => [
'configuration' => [
'showInWorkspaces' => true,
'navFrameRoute' => 'modules/web/pagetree',
'icon' => 'EXT:somewhere/Resources/Public/Icons/moduleIcon.svg',
'labels' => [
'module' => 'LLL:EXT:someotherext/locallang_mod.xml:moduleName',
'summary' => 'LLL:EXT:someotherext/locallang_mod.xml:summary',
'description' => 'LLL:EXT:someotherext/locallang_mod.xml:description',
]
],
'subModules' => [
'send_direct_mail' => [
'configuration' => [
'roles' => [
'sender',
],
'showInWorkspaces' => true,
'inheritNavFrame' => true, //arguably, we could assume "true" as default so you need to switch it OFF
'moduleRoute' => 'modules/web/page', //it'd be clever to build this automatically so it could be omitted
'icon' => 'EXT:somewhereELse/Resources/Public/Icons/moduleIcon.svg',
'labels' => [
'module' => 'LLL:EXT:someotherext/locallang_mod.xml:moduleName',
'summary' => 'LLL:EXT:someotherext/locallang_mod.xml:summary',
'description' => 'LLL:EXT:someotherext/locallang_mod.xml:description',
]
],
'subMenuPosition' => 'left', // could be "top", in which case it'd create a tabbed module
'subModules' => [
'neatHu' => [
'configuration' => [
'roles' => [
'sender',
],
'showInWorkspaces' => true,
'inheritNavFrame' => true,
'moduleRoute' => 'modules/web/page',
'icon' => 'EXT:somewhereELse/Resources/Public/Icons/moduleIcon.svg',
'labels' => [
'module' => 'LLL:EXT:someotherext/locallang_mod.xml:moduleName',
'summary' => 'LLL:EXT:someotherext/locallang_mod.xml:summary',
'description' => 'LLL:EXT:someotherext/locallang_mod.xml:description',
]
],
],
]
],
'recipient' => [
'configuration' => [
'roles' => [
'recipientListCreator',
],
'showInWorkspaces' => true,
'inheritNavFrame' => true,
'moduleRoute' => 'modules/web/page',
'icon' => 'EXT:somewhereELse/Resources/Public/Icons/moduleIcon.svg',
'labels' => [
'module' => 'LLL:EXT:someotherext/locallang_mod.xml:moduleName',
'summary' => 'LLL:EXT:someotherext/locallang_mod.xml:summary',
'description' => 'LLL:EXT:someotherext/locallang_mod.xml:description',
]
],
],
'statistics' => [
'configuration' => [
'roles' => [
'sender',
'statistics'
],
'showInWorkspaces' => true,
'inheritNavFrame' => true,
'moduleRoute' => 'modules/web/page',
'icon' => 'EXT:somewhereELse/Resources/Public/Icons/moduleIcon.svg',
'labels' => [
'module' => 'LLL:EXT:someotherext/locallang_mod.xml:moduleName',
'summary' => 'LLL:EXT:someotherext/locallang_mod.xml:summary',
'description' => 'LLL:EXT:someotherext/locallang_mod.xml:description',
]
],
]
]
]
]
];
@benjaminkott
Copy link

Please consider that stacking submodules in submodules could come to the conclusion that the hirachy is endlessly stackable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment