-
Notifications
You must be signed in to change notification settings - Fork 26
/
ext_tables.php
90 lines (84 loc) · 2.65 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
declare(strict_types=1);
use In2code\Luxletter\Utility\ConfigurationUtility;
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;
defined('TYPO3') || die();
/**
* Register Icons
*/
$iconRegistry = GeneralUtility::makeInstance(
IconRegistry::class
);
$iconRegistry->registerIcon(
'extension-lux',
SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/lux.svg']
);
$iconRegistry->registerIcon(
'extension-luxletter',
SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/Extension.svg']
);
$iconRegistry->registerIcon(
'extension-lux-module',
SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/lux_white.svg']
);
$iconRegistry->registerIcon(
'extension-luxletter-module',
SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/lux_module_newsletter.svg']
);
$iconRegistry->registerIcon(
'extension-luxletter-star',
SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/star.svg']
);
$iconRegistry->registerIcon(
'teaser',
SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/ctype-teaser.svg']
);
$iconRegistry->registerIcon(
'luxletter-widget-receiver',
SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/widget_receiver.svg']
);
$iconRegistry->registerIcon(
'luxletter-widget-newsletter',
SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/widget_newsletter.svg']
);
$iconRegistry->registerIcon(
'apps-pagetree-luxletter',
SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/luxletter_doktype.svg']
);
$iconRegistry->registerIcon(
'apps-pagetree-luxletter-contentFromPid',
SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/luxletter_doktype.svg']
);
/**
* Add static page TSconfig
*/
ExtensionManagementUtility::addPageTSConfig(
'@import "EXT:luxletter/Configuration/PageTSConfig/ContentElements.typoscript"'
);
/**
* Add new page doktype
*/
if (ConfigurationUtility::isMultiLanguageModeActivated()) {
$doktype = ConfigurationUtility::getMultilanguageNewsletterPageDoktype();
$GLOBALS['PAGES_TYPES'][$doktype] = [
'type' => 'web',
'allowedTables' => '*',
];
// Allow backend users to drag and drop the new page type:
ExtensionManagementUtility::addUserTSConfig(
'options.pageTree.doktypesToShowInNewPageDragArea := addToList(' . $doktype . ')'
);
}