-
Notifications
You must be signed in to change notification settings - Fork 9
/
ext_tables.php
executable file
·112 lines (102 loc) · 2.83 KB
/
ext_tables.php
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
if(!defined('TYPO3_MODE')) {
die ('Access denied.');
}
if(TYPO3_MODE === "BE") {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Snowflake.' . $_EXTKEY,
'snowbabel',
'',
'',
array(),
array(
'access' => 'user,group',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_module_snowbabel.xlf'
)
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Snowflake.' . $_EXTKEY,
'snowbabel',
'translation',
'',
array(
'Translation' => 'index'
),
array(
'icon' => 'EXT:snowbabel/ext_icon.svg',
'access' => 'user,group',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_module_translation.xlf'
)
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Snowflake.' . $_EXTKEY,
'snowbabel',
'settings',
'',
array(
'Settings' => 'index'
),
array(
'icon' => 'EXT:snowbabel/ext_icon.svg',
'access' => 'user,group',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_module_settings.xlf'
)
);
// Todo: use autoinclude tca
// Extend Beusers For Translation Access Control
$tempColumns = array(
'tx_snowbabel_extensions' => array(
'exclude' => 1,
'label' => 'LLL:EXT:snowbabel/Resources/Private/Language/locallang_settings.xlf:settings_extended_extensions',
'config' => Array(
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'itemsProcFunc' => 'Snowflake\Snowbabel\Hook\Tca->getExtensions',
'size' => 10,
'maxitems' => 9999,
'default' => ''
)
),
'tx_snowbabel_languages' => array(
'exclude' => 1,
'label' => 'LLL:EXT:snowbabel/Resources/Private/Language/locallang_settings.xlf:settings_extended_languages',
'config' => Array(
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'itemsProcFunc' => 'Snowflake\Snowbabel\Hook\Tca->getLanguages',
'size' => 10,
'maxitems' => 9999,
'default' => ''
)
),
);
// Add be_groups fields
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
'be_groups',
$tempColumns,
1
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'be_groups',
'tx_snowbabel_extensions;;;;1-1-1'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'be_groups',
'tx_snowbabel_languages;;;;1-1-1'
);
// Add be_users fields
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
'be_users',
$tempColumns,
1
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'be_users',
'tx_snowbabel_extensions;;;;1-1-1'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'be_users',
'tx_snowbabel_languages;;;;1-1-1'
);
unset($tempColumns);
}