forked from a-r-m-i-n/dce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_tables.php
73 lines (65 loc) · 2.7 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
<?php
/* | This extension is made for TYPO3 CMS and is licensed
* | under GNU General Public License.
* |
* | (c) 2012-2023 Armin Vieweg <[email protected]>
*/
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$boot = function ($extensionKey) {
$extensionIconPath = 'EXT:' . $extensionKey . '/Resources/Public/Icons/DceModuleIcon.svg';
// Register backend module
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
\T3\Dce\Compatibility::isTypo3Version('10.0.0') ? $extensionKey : 'T3.' . $extensionKey,
'tools',
'dceModule',
'',
[
\T3\Dce\Compatibility::isTypo3Version('10.0.0') ? \T3\Dce\Controller\DceModuleController::class : 'DceModule' =>
'index,clearCaches,hallOfFame,updateTcaMappings',
],
[
'access' => 'user,group',
'icon' => $extensionIconPath,
'labels' => 'LLL:EXT:' . $extensionKey . '/Resources/Private/Language/locallang_mod.xlf',
]
);
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('linkvalidator')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'mod.linkvalidator.searchFields.tt_content := addToList(pi_flexform)'
);
}
/** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
// DCE Icon
$iconRegistry->registerIcon(
'ext-dce-dce',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:dce/Resources/Public/Icons/ext_icon.png']
);
// DCE Field Type Icons
$iconRegistry->registerIcon(
'ext-dce-dcefield-type-element',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:dce/Resources/Public/Icons/tx_dce_domain_model_dcefield_element.png']
);
$iconRegistry->registerIcon(
'ext-dce-dcefield-type-tab',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:dce/Resources/Public/Icons/tx_dce_domain_model_dcefield_tab.png']
);
$iconRegistry->registerIcon(
'ext-dce-dcefield-type-section',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:dce/Resources/Public/Icons/tx_dce_domain_model_dcefield_section.png']
);
foreach (['dce', 'dcefield'] as $table) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
'tx_dce_domain_model_' . $table,
'EXT:dce/Resources/Private/Language/locallang_csh_' . $table . '.xlf'
);
}
};
$boot('dce');
unset($boot);