forked from nitsan-technologies/ns_ext_compatibility
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_tables.php
62 lines (60 loc) · 2.79 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
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$_EXTKEY = 'ns_ext_compatibility';
if (version_compare(TYPO3_branch, '6.0', '<')) {
if (TYPO3_MODE === 'BE') {
/**
* Registers a Backend Module
*/
Tx_Extbase_Utility_Extension::registerModule(
$_EXTKEY,
'tools', // Make module a submodule of 'tools'
'nsextcompatibility', // Submodule key
'', // Position
[
'nsextcompatibility4' => 'list, viewAllVersion,detail',
],
[
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/ns_ext_compatibility.svg',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:module.title',
]
);
}
t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript/nsextcompatibility4', 'ns_ext_compatibility');
} else {
if (TYPO3_MODE === 'BE') {
/**
* Registers a Backend Module
*/
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'NITSAN.' . $_EXTKEY,
'tools', // Make module a submodule of 'tools'
'nsextcompatibility', // Submodule key
'', // Position
[
'nsextcompatibility' => 'list,viewAllVersion,detail'
],
[
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/ns_ext_compatibility.svg',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:module.title',
]
);
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['NITSAN\\NsExtCompatibility\\Task\\SendExtensionsReportTask'] =[
'extension' => $_EXTKEY,
'title' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf:task.sendExtensionsReportTask.title',
'description' => 'LLL:EXT:pb_check_extensions/Resources/Private/Language/locallang.xlf:task.sendReport.description',
'additionalFields' => 'NITSAN\\NsExtCompatibility\\Task\\SendExtensionsReportTaskAdditionalFieldProvider'
];
}
if (version_compare(TYPO3_branch, '6.2', '<')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/nsextcompatibility6/6.1', 'ns_ext_compatibility');
} elseif (version_compare(TYPO3_branch, '7.0', '<')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/nsextcompatibility6/6.2', 'ns_ext_compatibility');
} else {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'ns_ext_compatibility');
}
}