diff --git a/CHANGELOG.md b/CHANGELOG.md index 625099f..00a2a9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). - Drop the dependency of `roave/security-advisories` ### Fixed +- Keep the global namespace clean in `ext_localconf.php` (#40) - Update the badge URLs in the README (#29, #22) - Fix code inspection warnings - Use the new annotations for lazy loading diff --git a/ext_localconf.php b/ext_localconf.php index 5f27f81..ee60ac5 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -1,16 +1,20 @@ 'index, show', - ], - // non-cacheable actions - [ - 'Tea' => '', - ] -); +defined('TYPO3_MODE') or die('Access denied.'); + +(static function () { + // This makes the plugin available for front-end rendering. + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + // extension name, exactly matching the PHP namespaces (vendor and product) + 'TTN.Tea', + // arbitrary, but unique plugin name (not visible in the BE) + 'Tea', + // all actions + [ + 'Tea' => 'index, show', + ], + // non-cacheable actions + [ + 'Tea' => '', + ] + ); +})();