Review main Merged

70973[TASK] Deprecate ext:backend BackendTemplateView

Christian Kuhn CR +2 V +2 Hard +383 −489 updated 09/15/21, 22:36

Commit message

The BackendTemplateView is a - usually Extbase backend
module related - Fluid view that adds a default backend
ModuleTemplate to render backend module content.

That implementation has a couple of drawbacks:
* Using BackendTemplateView hides a dependency to the
  request object by triggering a fallback in ModuleTemplate
  accessing $GLOBALS['TYPO3_REQUEST'].
* Using $this->view->getModuleTemplate() is pretty ugly,
  controllers should work with the ModuleTemplateFactory
  instead and retrieve an instance of ModuleTemplate using
  create($request).
* The level of indirection by having ModuleTemplate within
  the view class magically created makes controller actions
  harder to follow and understand.

With extbase Request nowadays implementing ServerRequestInterface
we can get rid of this indirection: Controllers should get an
instance of ModuleTemplateFactory injected, receive the
ModuleTemplate using ->create($request), and add further
title and doc header related details using that instance.

The patch changes ext:indexed_search, ext:extensionmanager and
ext:form to do that, and deprecates BackendTemplateView.

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 5

Files 20