The following components are involved in the rendering process and assume different roles in the MVC pattern:
DataProviders are used to provide relevant data for processing by a
DataProcessor. The data source is irrelevant: data can be provided both
from local sources such as the TYPO3 database and from external sources
such as APIs.
DataProviders fulfill the part of the Model in the MVC pattern.
The data supplied is not necessarily only applicable to a specific template,
but serves the general usability of all components involved in the rendering
process of a parent module.
DataProcessors are the entry point into the entire rendering process.
They fetch the data from the
DataProvider, process it and pass it on to
This is where the entire processing logic takes place. Thus,
fulfill the part of the Controller in the MVC pattern. They are usually
addressed directly via TypoScript.
Presenter, the supplied data is prepared for rendering a specific
Handlebars template. Dependent templates can also be selected based on
the supplied data if multiple template variants are possible.
In the MVC pattern, the
Presenter takes on a transitional role
DataProcessor (Controller) and the
The template is finally rendered in the
Renderer. For this purpose,
the template is compiled and filled with data from the
resulting output is returned and completes the rendering process.
Renderer is thus responsible for the View in the context of the
MVC pattern. The compiled templates used for this are usually cached.
Helpers describe a simple way to bring custom PHP functionality to
Handlebars templates. They are similar to ViewHelpers used in Fluid
Renderer is able to handle various
Helpers. There are
few limitations to the successful use of
- The associated callable (class method/function) must be publicly callable
- If the callable is a class method, it must be loadable by the registered PHP class autoloader
Helpers play a rather subordinate role in the MVC pattern, since
they are not explicitly involved. However, since they are implicitly
involved in the output of a template, they most likely take the role
of the View.
Whenever a template is rendered by the
Renderer, it must first be
resolved, e.g. by looking it up in all defined template root paths. It
is necessary to define a
TemplateResolver for each
Renderer itself is not able to resolve template paths.
TemplateResolver is also used for resolving partials. However,
since partials do not necessarily have to be used, defining a
TemplateResolver for them is optional.