Review main Merged

69269[TASK] Deprecate ext:backend ModuleLayout view helpers

Christian Kuhn CR +2 V +2 Hard +566 −412 updated 05/27/21, 19:05

Commit message

A while after the PHP based ModuleTemplate API has been
introduced back in 2015, a couple of fluid view helpers
have been added to ext:backend as a second way to handle
full backend module content like the doc header.
It found an example use in ext:beuser.

Development however stopped at this point, the provided
view helpers are only a sub set of the PHP based API and
they didn't find broader use within the core - all other
backend modules stick to the ModuleTemplate based API.

On a structural level, those view helpers are questionable:
They move functionality to the view component which is
arguably more a controller task. The ext:beuser module
proofes this since it had to assign controller knowledge
like the current action and controller name to the view
in order to render the doc header module down and shortcut
buttons.

The patch drops usages of these view helpers in ext:beuser,
plus the minor usages of the outer ModuleLayout view helper
in ext:install and ext:belog, substitutes them with the
PHP ModuleTemplate API within controllers, and deprecates
the full set of ModuleLayout view helpers.

The change sharpens our separation between controller and
view: The "outer" module handling like doc header buttons
and menus are tied to controller logic and should be
located there, while the module body is rendered by a
fluid view.

As a bonus, a couple of issues within ext:beuser are
fixed along the way, since they can now be easily solved
and were rather hard to tackle with the view helper based
approach:
* The beuser module now remembers state and jumps to
  for instance the group sub module when a user selected
  this last. This is now in line with many other backend
  modules that do the same.
* Shortcuts to single user details work.
* The main doc header drop down can now contain all possible
  sub modules, including those that are available only
  indirectly, for instance the single user details view.
  This is good when calling these from shortcuts.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oli Bartsch +1
    • Jochen Roth +1
    • Anja Leichsenring +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oli Bartsch +1
    • Jochen Roth +1
    • Anja Leichsenring +1
    • core-ci +1 CI

Issues 1

Files 28

Show 8 more files

Review log 2128

Show 23 earlier messages
  1. Christian Kuhn uploaded patch set 1 05/26/21, 15:10

  2. Christian Kuhn marked it work in progress 05/26/21, 15:10

  3. core-ci voted on patch set 1 V -1 05/26/21, 15:12 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11871

  1. Oli Bartsch commented on patch set 1 05/26/21, 15:36

    BackendUserController.php:95

    Let's define $this->moduleTemplate here, instead of duplicating the code in each action. See the non-extbase controller as example which do this in their mainAction/processRequest/... methods. $this->moduleTemplate = $this->moduleTemplateFactory->create($request);
  2. Christian Kuhn commented on patch set 1 05/26/21, 15:57

    BackendUserController.php:95 Reply

    I didn't do that since $request is not available at this point ... if extbase ever manages to hand over psr-7 compatible requests to actions, initializeAction still does not receive the request (which is stupid anyways) ... to not add additional headaches when extbase gives us psr-7 so we can drop this ugly getRequest() method here, I for now stick with creating moduleTemplate each action. But it's matter of taste. If you insist on it, I'll happily adapt.
  3. Christian Kuhn uploaded patch set 2 05/27/21, 10:25

  4. core-ci voted on patch set 2 V -1 05/27/21, 10:36 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11892

  5. Christian Kuhn uploaded patch set 3 05/27/21, 12:27

  6. core-ci voted on patch set 3 V +1 05/27/21, 12:39 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11895

  7. Christian Kuhn uploaded patch set 4 05/27/21, 13:32

  8. Christian Kuhn marked it ready for review 05/27/21, 13:32

  9. core-ci voted on patch set 4 V +1 05/27/21, 13:43 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11896

  10. Christian Kuhn commented on patch set 4 05/27/21, 13:45

    BackendUserController.php:95 Reply

    Done
  11. Christian Kuhn uploaded patch set 5 05/27/21, 13:59

  12. core-ci voted on patch set 5 V +1 05/27/21, 14:10 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11899

  13. Jochen Roth voted on patch set 5 V +1 CR +1 05/27/21, 14:21

  14. Christian Kuhn uploaded patch set 6 05/27/21, 17:42

  15. Jochen Roth voted on patch set 6 V +1 CR +1 05/27/21, 17:48

  16. core-ci voted on patch set 6 V +1 05/27/21, 17:53 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11909

  17. Anja Leichsenring voted on patch set 6 V +1 CR +1 05/27/21, 17:58

  18. Oli Bartsch commented on patch set 6 CR -1 05/27/21, 18:00

    still on it
  19. Oli Bartsch uploaded patch set 7 05/27/21, 18:52

  20. Oli Bartsch voted on patch set 7 V +1 CR +1 05/27/21, 18:52

  21. Anja Leichsenring voted on patch set 7 V +1 CR +1 05/27/21, 18:54

  22. Jochen Roth voted on patch set 7 V +1 CR +1 05/27/21, 19:01

  23. core-ci voted on patch set 7 V +1 05/27/21, 19:04 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11917

  24. Christian Kuhn voted on patch set 7 V +2 CR +2 05/27/21, 19:05

  25. Christian Kuhn merged patch set 8 05/27/21, 19:05