-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathext_tables.php
More file actions
53 lines (50 loc) · 2.19 KB
/
Copy pathext_tables.php
File metadata and controls
53 lines (50 loc) · 2.19 KB
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
<?php
/*
* Copyright by Agentur am Wasser | Maeder & Partner AG
*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
defined('TYPO3_MODE') or die();
(function() {
/** @var \AawTeam\Pagenotfoundhandling\Configuration\ExtensionConfiguration $extensionConfiguration */
$extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\AawTeam\Pagenotfoundhandling\Configuration\ExtensionConfiguration::class);
// Add the statistics backend module
if ($extensionConfiguration->has('enableStatisticsModule') && $extensionConfiguration->get('enableStatisticsModule')) {
/** @var \AawTeam\Pagenotfoundhandling\Utility\Typo3VersionUtility $typo3VersionUtility */
$typo3VersionUtility = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\AawTeam\Pagenotfoundhandling\Utility\Typo3VersionUtility::class);
if ($typo3VersionUtility->isCurrentTypo3VersionAtLeast('10')) {
$extensionName = 'Pagenotfoundhandling';
$controllerActions= [
\AawTeam\Pagenotfoundhandling\Controller\StatisticsController::class => 'index',
];
} else {
$extensionName = 'AawTeam.Pagenotfoundhandling';
$controllerActions= [
'Statistics' => 'index',
];
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
$extensionName,
'web',
'statistics',
'',
$controllerActions,
[
'access' => 'user,group',
'iconIdentifier' => 'pagenotfoundhandling-module-statistics',
'labels' => 'LLL:EXT:pagenotfoundhandling/Resources/Private/Language/module_statistics.xlf',
'navigationComponentId' => '',
'inheritNavigationComponentFromMainModule' => false,
]
);
}
})();