Review main Abandoned

72794[WIP][FEATURE] Add agnostic View for Backend modules

Benni Mack CR 0 V 0 Normal +179 −62 updated 02/04/22, 12:14

Commit message

This change introduces a couple of features:

a) A ViewInterface within TYPO3 Core that is not directly
   coupled to Fluid, but compatible with Fluid.
b) A BackendTemplateViewFactory which can be injected to build
   a View object based on a request.
c) Path configuration by one path (Templates) and overridable
   via PageTSconfig.
d) Simplified path configuration, in order to ease the available
options.

"templateRootPaths" are now called "view.templates", and - if not
defined otherwise - partials are placed under
"Resources/Private/Templates/Partials"
and Layouts under Resources/Private/Templates/Layouts/

Ideally, one would then just call

$view = $viewFactory->createFromRequest($request);
$view->render('MyTemplateFile');

and the rest is taken care of by the ViewFactory and the Configuration.

See related Fluid templating engine change: https://github.com/TYPO3/Fluid/pull/581/files

The main benefits of this change:
* Reduce hard-coded paths in Controllers
* Reduce dependencies to Fluid's StandaloneView
* Allow to replace paths via Configuration

Review

  • Code review CR 0

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

  • Verified V 0

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

Files 8