-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathext_tables.php
43 lines (36 loc) · 1.6 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
<?php
use DominicJoas\DjImagetools\Controller\FileController;
use DominicJoas\DjImagetools\Controller\MetaController;
use DominicJoas\DjImagetools\Controller\SettingsController;
use DominicJoas\DjImagetools\Controller\StructureController;
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
use TYPO3\CMS\Core\Imaging\IconRegistry;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$icon = 'EXT:dj_imagetools/Resources/Public/Icons/ImageTools.svg';
call_user_func(function($extKey) use ($icon) {
ExtensionManagementUtility::addStaticFile($extKey, "Configuration/Typoscript", "ImageTools");
ExtensionUtility::registerModule(
'DominicJoas.' . $extKey,
'file',
'tx_imagetools_module1',
'bottom',
[
FileController::class => 'list, update, updateAll, disableEntry, undo',
MetaController::class => 'list, update',
StructureController::class => 'list, delete',
SettingsController::class => 'list, update'
],
[
'icon' => $icon,
'labels' => 'LLL:EXT:dj_imagetools/Resources/Private/Language/locallang_mod.xlf',
]
);
}, "dj_imagetools");
$iconRegistry = GeneralUtility::makeInstance(IconRegistry::class);
$iconRegistry->registerIcon("imagetools-icon", SvgIconProvider::class, ['source' => $icon]);
ExtensionManagementUtility::addLLrefForTCAdescr('xMOD_tx_dj_imagetools', 'EXT:dj_imagetools/Resources/Private/Language/locallang_csh.xlf');