| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- use Opentalent\OtTemplating\Controller\OtCustomizerController;
- 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()
- {
- // Include the configuration files
- \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
- 'ot_templating',
- 'Configuration/TypoScript',
- 'Templating');
- if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface &&
- ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend()) {
- /**
- * Registers the customizer backend module
- */
- \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
- 'OtTemplating',
- 'web', // Make module a submodule of 'web'
- 'otcustomizer', // Submodule key
- 'before:OtStatsOtstats', // Position
- array(
- OtCustomizerController::class => 'index,selectTemplate,updatePreferences',
- ),
- array(
- 'access' => 'user,group',
- 'icon' => 'EXT:ot_templating/Resources/Public/Icons/Extension.png',
- 'labels' => 'LLL:EXT:ot_templating/Resources/Private/Language/locallang_mod.xlf',
- )
- );
- }
- }
- );
|