forked from sonority/geolocations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
66 lines (59 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
<?php
defined('TYPO3_MODE') or die();
// Load extension manager configuration
if (!empty($_EXTCONF)) {
$_EXTCONF = unserialize($_EXTCONF);
}
// CSH - context sensitive help
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
'tt_content.pi_flexform.' . $_EXTKEY . '_pi1.list',
'EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_csh_flexforms.xlf'
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Sonority.' . $_EXTKEY, 'pi1', 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_be.xlf:pi1_title'
);
if (!empty($_EXTCONF['enableBackendModule'])) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Sonority.' . $_EXTKEY, 'web', 'mod1', '',
[
'Administration' => 'overview,fillMissingCoordinates,geocodeAddress,settingsError,ajaxGeocodeAddress,ajaxStartGeocodeProcess,ajaxCheckGeocodeProcess',
], [
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/module-tstemplate.svg',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xlf'
]
);
}
// Add static typoscript configurations
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/', 'Geolocations');
if (TYPO3_MODE === 'BE') {
/** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
'apps-pagetree-folder-contains-locations',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
[
'source' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/ext-geolocations-folder-tree.svg'
]
);
$iconRegistry->registerIcon(
'ext-geolocations-wizard-icon', \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
[
'source' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/ce_wizard.svg'
]
);
$iconRegistry->registerIcon(
'ext-geolocations-google-maps-form-icon',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
[
'source' => 'EXT:' . $_EXTKEY . '/Resources/Public/Images/google-maps.png'
]
);
// Override geolocations icon
$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-locations'] = 'apps-pagetree-folder-contains-locations';
$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = [
0 => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_be.xlf:locations-folder',
1 => 'locations',
2 => 'apps-pagetree-folder-contains-locations'
];
}