[!!!][TASK] Refactor create bookmark handling
The backend shortcut / bookmark handlig API was designed to hand over relevant get/post arguments as key only (eg. 'id'). The underlying code then pulled values from GET/POST or from SOBE->MOD_SETTINGS. This is ugly, there shouldn't be such magic: Only controllers know relevant keys and values, so it should hand them over directly to the shortcut API. The patch changes this: * Old and unused ViewHelper f:be.buttons.shortcut is deprecated. * ViewHelper be:moduleLayout.button.shortcutButton deprecates argument 'getVars' and adds new argument 'arguments'. * Class ShortcutButton has a new setter 'setArguments' that accepts all relevant argument key/value pairs to create a shortcut. Existing get/set related methods are deprecated. * Helper methods 'makeShortcutIcon' and 'makeShortcutUrl' of class ModuleTemplate are deprecated and implemented in class ShortcutButton directly. * All core usages are adapted to new API. * Shortcut handling was the last core usage of SOBE, so last $GLOBALS['SOBE'] = $this assignments can be finally removed. Impact: * Shortcuts to modules not directly reachable via main menu do not work due to limits of the module registration API. An example is the 'create multiple pages' controller. This issue exists before the patch, affected controllers no longer render a shortcut button for now. * The old code usually added the 'route' argument twice for shortcuts. This has been resolved. As a side effect, the comparison if a shortcuts exists (yellow shortcut icon) fails currently for existing shortcuts when the patch is applied: The comparison relies on direct string equality since shortcuts always store the final url in the database. This storage strategy should be changed with another patch that will solve the 'no yellow icon' issue at the same time. Change-Id: I3ccd2b8f6adab8e7780c5f9911fdea013ccfa99b Resolves: #92132 Releases: master Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65503 Tested-by:Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de>
Showing
- typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php 0 additions, 1 deletion...Controller/ContentElement/NewContentElementController.php
- typo3/sysext/backend/Classes/Controller/EditDocumentController.php 22 additions, 12 deletions...ext/backend/Classes/Controller/EditDocumentController.php
- typo3/sysext/backend/Classes/Controller/HelpController.php 10 additions, 7 deletionstypo3/sysext/backend/Classes/Controller/HelpController.php
- typo3/sysext/backend/Classes/Controller/Page/NewMultiplePagesController.php 1 addition, 4 deletions...nd/Classes/Controller/Page/NewMultiplePagesController.php
- typo3/sysext/backend/Classes/Controller/Page/SortSubPagesController.php 1 addition, 4 deletions...ackend/Classes/Controller/Page/SortSubPagesController.php
- typo3/sysext/backend/Classes/Controller/PageLayoutController.php 10 additions, 8 deletions...ysext/backend/Classes/Controller/PageLayoutController.php
- typo3/sysext/backend/Classes/Controller/SimpleDataHandlerController.php 0 additions, 2 deletions...ackend/Classes/Controller/SimpleDataHandlerController.php
- typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php 13 additions, 10 deletions...ackend/Classes/Controller/SiteConfigurationController.php
- typo3/sysext/backend/Classes/Template/Components/Buttons/Action/ShortcutButton.php 84 additions, 48 deletions...ses/Template/Components/Buttons/Action/ShortcutButton.php
- typo3/sysext/backend/Classes/Template/ModuleTemplate.php 3 additions, 0 deletionstypo3/sysext/backend/Classes/Template/ModuleTemplate.php
- typo3/sysext/backend/Classes/ViewHelpers/ModuleLayout/Button/ShortcutButtonViewHelper.php 21 additions, 10 deletions...wHelpers/ModuleLayout/Button/ShortcutButtonViewHelper.php
- typo3/sysext/beuser/Classes/Controller/BackendUserController.php 3 additions, 0 deletions...ysext/beuser/Classes/Controller/BackendUserController.php
- typo3/sysext/beuser/Classes/Controller/BackendUserGroupController.php 7 additions, 0 deletions.../beuser/Classes/Controller/BackendUserGroupController.php
- typo3/sysext/beuser/Classes/Controller/PermissionController.php 4 additions, 9 deletions...sysext/beuser/Classes/Controller/PermissionController.php
- typo3/sysext/beuser/Resources/Private/Layouts/Default.html 4 additions, 1 deletiontypo3/sysext/beuser/Resources/Private/Layouts/Default.html
- typo3/sysext/core/Documentation/Changelog/master/Breaking-92132-LastRemainsOfGlobalsSOBERemoved.rst 35 additions, 0 deletions...master/Breaking-92132-LastRemainsOfGlobalsSOBERemoved.rst
- typo3/sysext/core/Documentation/Changelog/master/Deprecation-92132-DeprecatedShortcutPHPAPI.rst 52 additions, 0 deletions...log/master/Deprecation-92132-DeprecatedShortcutPHPAPI.rst
- typo3/sysext/core/Documentation/Changelog/master/Deprecation-92132-DeprecatedViewHelperFbebuttonsshortcut.rst 37 additions, 0 deletions...recation-92132-DeprecatedViewHelperFbebuttonsshortcut.rst
- typo3/sysext/filelist/Classes/Controller/File/EditFileController.php 0 additions, 6 deletions...t/filelist/Classes/Controller/File/EditFileController.php
- typo3/sysext/filelist/Classes/Controller/FileListController.php 7 additions, 4 deletions...sysext/filelist/Classes/Controller/FileListController.php
Please register or sign in to comment