ext_tables.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. use Opentalent\OtTemplating\Controller\OtCustomizerController;
  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. // Include the configuration files
  11. \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
  12. 'ot_templating',
  13. 'Configuration/TypoScript',
  14. 'Templating');
  15. if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface &&
  16. ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend()) {
  17. /**
  18. * Registers the customizer backend module
  19. */
  20. \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
  21. 'OtTemplating',
  22. 'web', // Make module a submodule of 'web'
  23. 'otcustomizer', // Submodule key
  24. 'before:OtStatsOtstats', // Position
  25. array(
  26. OtCustomizerController::class => 'index,selectTemplate,updatePreferences',
  27. ),
  28. array(
  29. 'access' => 'user,group',
  30. 'icon' => 'EXT:ot_templating/Resources/Public/Icons/Extension.png',
  31. 'labels' => 'LLL:EXT:ot_templating/Resources/Private/Language/locallang_mod.xlf',
  32. )
  33. );
  34. }
  35. }
  36. );