-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_tables.php
40 lines (36 loc) · 1.41 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
<?php
defined('TYPO3_MODE') || die('Access denied.');
(function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_poimap_domain_model_place');
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$icons = [
'place-default' => [],
'place-tourist-attraction' => [],
'place-landmarks-or-historical-buildings' => [],
'place-accommodation' => [],
'place-local-business' => [],
'place-residence' => [],
'place-landform' => [],
'place-civic-structure' => [],
'place-administrative-area' => [],
];
foreach ($icons as $identifier => $config) {
if (is_string($config)) {
$config = [
'path' => $config,
'provider' => \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
];
}
if (!isset($config['path']) || !$config['path']) {
$config['path'] = 'EXT:poi_map/Resources/Public/Icons/Types/Default.svg';
}
if (!isset($config['provider']) || !$config['provider']) {
$config['provider'] = \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class;
}
$iconRegistry->registerIcon(
'tx-poimap-' . $identifier,
$config['provider'],
['source' => $config['path']]
);
}
})();