|
|
@@ -1,8 +1,6 @@
|
|
|
<?php
|
|
|
|
|
|
use Opentalent\OtStats\Controller\OtStatsController;
|
|
|
-use Psr\Http\Message\ServerRequestInterface;
|
|
|
-use TYPO3\CMS\Core\Http\ApplicationType;
|
|
|
|
|
|
defined('TYPO3') || die('Access denied.');
|
|
|
|
|
|
@@ -11,26 +9,22 @@ defined('TYPO3') || die('Access denied.');
|
|
|
call_user_func(
|
|
|
function()
|
|
|
{
|
|
|
- if (
|
|
|
- ($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface &&
|
|
|
- ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend()) {
|
|
|
- /**
|
|
|
- * Registers the statistics backend module
|
|
|
- */
|
|
|
- \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
|
|
|
- 'OtStats',
|
|
|
- 'web', // Make module a submodule of 'web'
|
|
|
- 'otstats', // Submodule key
|
|
|
- 'after:OtTemplatingOtcustomizer', // Position
|
|
|
- array(
|
|
|
- OtStatsController::class => 'index,askForActivationConfirmation,askForDeactivationConfirmation,enableStats,disableStats'
|
|
|
- ),
|
|
|
- array(
|
|
|
- 'access' => 'user,group',
|
|
|
- 'icon' => 'EXT:ot_stats/Resources/Public/Icons/pie-chart.png',
|
|
|
- 'labels' => 'LLL:EXT:ot_stats/Resources/Private/Language/locallang_mod.xlf',
|
|
|
- )
|
|
|
- );
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * Registers the statistics backend module
|
|
|
+ */
|
|
|
+ \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
|
|
|
+ 'OtStats',
|
|
|
+ 'web', // Make module a submodule of 'web'
|
|
|
+ 'otstats', // Submodule key
|
|
|
+ 'after:OtTemplatingOtcustomizer', // Position
|
|
|
+ array(
|
|
|
+ OtStatsController::class => 'index,askForActivationConfirmation,askForDeactivationConfirmation,enableStats,disableStats'
|
|
|
+ ),
|
|
|
+ array(
|
|
|
+ 'access' => 'user,group',
|
|
|
+ 'icon' => 'EXT:ot_stats/Resources/Public/Icons/pie-chart.png',
|
|
|
+ 'labels' => 'LLL:EXT:ot_stats/Resources/Private/Language/locallang_mod.xlf',
|
|
|
+ )
|
|
|
+ );
|
|
|
}
|
|
|
);
|