forked from TYPO3-extensions/tt_address
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
executable file
·44 lines (34 loc) · 1.57 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
<?php
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3_MODE') or die();
call_user_func(function () {
ExtensionManagementUtility::allowTableOnStandardPages('tt_address');
ExtensionManagementUtility::addToInsertRecords('tt_address');
if (ExtensionManagementUtility::isLoaded('vidi')) {
/** @var \Fab\Vidi\Module\ModuleLoader $moduleLoader */
$moduleLoader = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Fab\Vidi\Module\ModuleLoader::class, 'tt_address');
$configuration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class
)->get('tt_address');
/** @var \Fab\Vidi\Module\ModuleLoader $moduleLoader */
$moduleLoader->setIcon('EXT:tt_address/ext_icon.png')
->setModuleLanguageFile('LLL:EXT:tt_address/Resources/Private/Language/tt_address.xlf')
->setDefaultPid((int)$configuration['default_pid'])
->register();
}
// Add new sprite icon.
$icons = [
'address' => 'EXT:tt_address/ext_icon.png',
];
/** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
foreach ($icons as $key => $icon) {
$iconRegistry->registerIcon('extensions-tt_address-' . $key,
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
[
'source' => $icon
]
);
}
unset($iconRegistry);
});