ext_tables.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. use Opentalent\OtStats\Controller\OtStatsController;
  3. use Psr\Http\Message\ServerRequestInterface;
  4. use TYPO3\CMS\Core\Http\ApplicationType;
  5. defined('TYPO3') || die('Access denied.');
  6. // ext_tables.php contient les directives permettant de configurer le backend
  7. call_user_func(
  8. function()
  9. {
  10. if (
  11. ($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface &&
  12. ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend()) {
  13. /**
  14. * Registers the statistics backend module
  15. */
  16. \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
  17. 'OtStats',
  18. 'web', // Make module a submodule of 'web'
  19. 'otstats', // Submodule key
  20. 'after:OtTemplatingOtcustomizer', // Position
  21. array(
  22. OtStatsController::class => 'index,askForActivationConfirmation,askForDeactivationConfirmation,enableStats,disableStats'
  23. ),
  24. array(
  25. 'access' => 'user,group',
  26. 'icon' => 'EXT:ot_stats/Resources/Public/Icons/pie-chart.png',
  27. 'labels' => 'LLL:EXT:ot_stats/Resources/Private/Language/locallang_mod.xlf',
  28. )
  29. );
  30. }
  31. }
  32. );