mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-22 07:56:13 +01:00
[BUGFIX] Keep the global namespace clean in ext_localconf.php (#39)
Move the plugin registration into a function.
This commit is contained in:
parent
9be1c23798
commit
1b4d0702c9
2 changed files with 20 additions and 15 deletions
|
@ -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
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
<?php
|
||||
// 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' => '',
|
||||
]
|
||||
);
|
||||
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' => '',
|
||||
]
|
||||
);
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue