<?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()
    {
        /**
         * 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',
            )
        );
    }
);
