| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- use Opentalent\OtStats\Controller\OtStatsController;
- use Psr\Http\Message\ServerRequestInterface;
- use TYPO3\CMS\Core\Http\ApplicationType;
- defined('TYPO3') || die('Access denied.');
- // ext_tables.php contient les directives permettant de configurer le backend
- 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',
- )
- );
- }
- }
- );
|