-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathext_tables.php
More file actions
49 lines (45 loc) · 1.97 KB
/
ext_tables.php
File metadata and controls
49 lines (45 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
defined('TYPO3_MODE') || die('Access denied.');
if (TYPO3_MODE === 'BE') {
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXT']['fbit_berecordlist']['modules'])) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
'fbit',
'',
'',
'',
[
'access' => 'group,user',
'labels' => 'LLL:EXT:fbit_berecordlist/Resources/Private/Language/locallang_mod_module.xlf',
'icon' => '',
'name' => null,
]
);
// By default we're only showing one table at a time, also we restrict the record types available per module.
// This means we don't want users to be able to - accidentially or intentionally - switch to another table other
// than by using the dropdown menu.
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
[globalString = GP:extension = /.+/]
mod.web_list.disableSingleTableView = 1
mod.web_list.itemsLimitSingleTable = 20
[END]
');
$modulesConfiguration = $GLOBALS['TYPO3_CONF_VARS']['EXT']['fbit_berecordlist']['modules'];
foreach ($modulesConfiguration as $extKey => $moduleConfiguration) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'FBIT.BeRecordList',
(isset($moduleConfiguration['mainModule']) ? $moduleConfiguration['mainModule'] : 'fbit'),
$extKey,
'',
[
'Module' => 'list',
],
[
'access' => 'user,group',
'icon' => $moduleConfiguration['icon'],
'labels' => $moduleConfiguration['labels'] . ':' . $extKey,
'navigationComponentId' => (array_key_exists('navigationComponentId', $moduleConfiguration) ? $moduleConfiguration['navigationComponentId'] : 'typo3-pagetree'),
]
);
}
}
}