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

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 28

Show 8 more files