forked from lochmueller/calendarize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
89 lines (76 loc) · 3.42 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
<?php
/**
* General ext_tables file.
*/
if (!\defined('TYPO3_MODE')) {
die('Access denied.');
}
\HDNET\Autoloader\Loader::extTables('HDNET', 'calendarize', \HDNET\Calendarize\Register::getDefaultAutoloader());
\HDNET\Calendarize\Register::extTables(\HDNET\Calendarize\Register::getGroupCalendarizeConfiguration());
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_calendarize_domain_model_configuration,tx_calendarize_domain_model_index');
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('ke_search')) {
$GLOBALS['TCA']['tx_kesearch_indexerconfig']['columns']['sysfolder']['displayCond'] .= ',calendarize';
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'calendarize',
'Calendar',
\HDNET\Calendarize\Utility\TranslateUtility::getLll('pluginName')
);
// module icon
$folderIcon = 'EXT:calendarize/Resources/Public/Icons/apps-pagetree-folder-contains-calendarize.svg';
/** @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-calendarize',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => $folderIcon]
);
$categoryRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Category\CategoryRegistry::class);
$categoryRegistry->add('calendarize', 'tx_calendarize_domain_model_pluginconfiguration');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
TCEMAIN {
linkHandler {
tx_calendarize_domain_model_event {
handler = TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler
label = Events
configuration {
table = tx_calendarize_domain_model_event
}
scanAfter = page
}
}
}
');
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'HDNET.calendarize',
'web',
'calendarize',
'',
['Backend' => 'list,option'],
[
// Additional configuration
'access' => 'user, group',
'icon' => 'EXT:calendarize/Resources/Public/Icons/Extension.svg',
'iconIdentifier' => 'module-my_redirects',
'labels' => 'LLL:EXT:calendarize/Resources/Private/Language/locallang_mod.xlf',
'navigationComponentId' => ''
]
);
$iconPath = \TYPO3\CMS\Core\Utility\PathUtility::getAbsoluteWebPath(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('EXT:calendarize/Resources/Public/Icons/'));
$iconRegistry->registerIcon(
'apps-calendarize-type-' . \HDNET\Calendarize\Domain\Model\Configuration::TYPE_TIME,
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => $iconPath . 'Configuration.png']
);
$iconRegistry->registerIcon(
'apps-calendarize-type-' . \HDNET\Calendarize\Domain\Model\Configuration::TYPE_GROUP,
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => $iconPath . 'ConfigurationGroupType.png']
);
$iconRegistry->registerIcon(
'apps-calendarize-type-' . \HDNET\Calendarize\Domain\Model\Configuration::TYPE_EXTERNAL,
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => $iconPath . 'ConfigurationExternal.png']
);
// Exclude "pages" and obsolete fields
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['calendarize_calendar'] = 'recursive,select_key,pages';