Skip to content
  • Christian Kuhn's avatar
    [!!!][TASK] Refactor create bookmark handling · 5be7b805
    Christian Kuhn authored and Anja Leichsenring's avatar Anja Leichsenring committed
    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: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
    Tested-by: default avatarTYPO3com <noreply@typo3.com>
    Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
    Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
    Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
    5be7b805