[FEATURE] Refactor AdminPanel API to use composition 87/57987/14
authorSusanne Moog <susanne.moog@typo3.org>
Sun, 26 Aug 2018 14:51:26 +0000 (16:51 +0200)
committerBenni Mack <benni@typo3.org>
Thu, 30 Aug 2018 16:58:49 +0000 (18:58 +0200)
commitd7ea9a755bed86e48bbc24f02f8bd64318dc330e
tree484235d1e8a4968fba30b2226bd04fa42a126ec4
parent8828eea0dedf7c7dabf78f9f8638b66fe799b431
[FEATURE] Refactor AdminPanel API to use composition

Enabling future enhancements for the adminpanel without
having to make breaking changes for existing module providers
is a key ingredient for providing a future proof extensible
solution. Using single big interfaces that need to change on
updates break backwards compatibility and do not provide
sufficient feature encapsulation.

The adminpanel APIs have been refactored to use a composition
pattern to allow modules more flexibility. Modules can now only
implement the interfaces they need instead of implementing all
functionality. For example an adminpanel module that only provides
page related settings does no longer have to implement the getContent
method.

Small interfaces have been provided as building blocks for modules with
rich functionality. Easy addition of new interfaces that _can_ (not
must) be implemented allow future improvements.

Additionally the API has been modified to allow a more object-oriented
approach using simple DTOs instead of associative arrays for better
type-hinting and a better developer experience. Storing and rendering
data have been separated in two steps allowing to completely disconnect
the rendered adminpanel from the current page. This is a preparation
for a standalone adminpanel that can be implemented separately.

Resolves: #86003
Releases: master
Change-Id: I88236a86e612dee9085b9f6ad7da34f90770d5ed
Reviewed-on: https://review.typo3.org/57987
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com>
Tested-by: Benjamin Kott <benjamin.kott@outlook.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
56 files changed:
typo3/sysext/adminpanel/Classes/Controller/MainController.php
typo3/sysext/adminpanel/Classes/Hooks/RenderHook.php [deleted file]
typo3/sysext/adminpanel/Classes/Middleware/AdminPanelDataPersister.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/Middleware/AdminPanelInitiator.php
typo3/sysext/adminpanel/Classes/Middleware/AdminPanelRenderer.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/Middleware/SqlLogging.php
typo3/sysext/adminpanel/Classes/ModuleApi/AbstractModule.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/AbstractSubModule.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/ConfigurableInterface.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/ContentProviderInterface.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/DataProviderInterface.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/InitializableInterface.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/ModuleData.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/ModuleDataStorageCollection.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/ModuleInterface.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/ModuleSettingsProviderInterface.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/OnSubmitActorInterface.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/PageSettingsProviderInterface.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/ResourceProviderInterface.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/ShortInfoProviderInterface.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/ModuleApi/SubmoduleProviderInterface.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/Modules/AbstractModule.php [deleted file]
typo3/sysext/adminpanel/Classes/Modules/AbstractSubModule.php [deleted file]
typo3/sysext/adminpanel/Classes/Modules/AdminPanelModuleInterface.php [deleted file]
typo3/sysext/adminpanel/Classes/Modules/AdminPanelSubModuleInterface.php [deleted file]
typo3/sysext/adminpanel/Classes/Modules/CacheModule.php
typo3/sysext/adminpanel/Classes/Modules/Debug/Log.php
typo3/sysext/adminpanel/Classes/Modules/Debug/QueryInformation.php
typo3/sysext/adminpanel/Classes/Modules/DebugModule.php
typo3/sysext/adminpanel/Classes/Modules/EditModule.php
typo3/sysext/adminpanel/Classes/Modules/Info/GeneralInformation.php
typo3/sysext/adminpanel/Classes/Modules/Info/PhpInformation.php
typo3/sysext/adminpanel/Classes/Modules/Info/RequestInformation.php
typo3/sysext/adminpanel/Classes/Modules/InfoModule.php
typo3/sysext/adminpanel/Classes/Modules/PreviewModule.php
typo3/sysext/adminpanel/Classes/Modules/TsDebug/TypoScriptWaterfall.php
typo3/sysext/adminpanel/Classes/Modules/TsDebugModule.php
typo3/sysext/adminpanel/Classes/Service/ConfigurationService.php
typo3/sysext/adminpanel/Classes/Service/ModuleLoader.php
typo3/sysext/adminpanel/Classes/Utility/ResourceUtility.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/Utility/StateUtility.php
typo3/sysext/adminpanel/Classes/View/AdminPanelView.php
typo3/sysext/adminpanel/Classes/ViewHelpers/SubModuleRenderViewHelper.php [new file with mode: 0644]
typo3/sysext/adminpanel/Configuration/RequestMiddlewares.php
typo3/sysext/adminpanel/Resources/Private/Layouts/Default.html
typo3/sysext/adminpanel/Resources/Private/Partials/Modules/Item.html
typo3/sysext/adminpanel/Resources/Private/Templates/Main.html
typo3/sysext/adminpanel/Tests/Unit/Fixtures/DisabledMainModuleFixture.php
typo3/sysext/adminpanel/Tests/Unit/Fixtures/MainModuleFixture.php
typo3/sysext/adminpanel/Tests/Unit/Fixtures/SubModuleFixture.php
typo3/sysext/adminpanel/Tests/Unit/Middleware/AdminPanelInitiatorTest.php
typo3/sysext/adminpanel/Tests/Unit/Service/ModuleLoaderTest.php
typo3/sysext/adminpanel/Tests/Unit/Utility/StateUtilityTest.php
typo3/sysext/adminpanel/ext_localconf.php
typo3/sysext/core/Documentation/Changelog/master/Feature-84584-Re-DesignTheAdminPanel.rst
typo3/sysext/core/Documentation/Changelog/master/Feature-86003-AdminpanelCompositionApi.rst [new file with mode: 0644]