Renderer 

Implement the \CPSIT\Typo3Handlebars\Renderer\Renderer interface to replace the entire rendering stack — for example to use a different template engine, add a pre-render transformation, or wrap the compiled output. The default implementation is \CPSIT\Typo3Handlebars\Renderer\HandlebarsRenderer.

interface Renderer
Fully qualified name
\CPSIT\Typo3Handlebars\Renderer\Renderer
renderTemplate ( RenderingContext $context)

Compile and render a template. The RenderingContext carries the template path or inline source, the current variable set, and the PSR-7 request.

param RenderingContext $context

The current rendering context.

returntype

string

renderPartial ( RenderingContext $context)

Compile and render a partial.

param RenderingContext $context

The current rendering context.

returntype

string

Wiring the implementation 

Register the custom renderer as the implementation of the Renderer interface in your extension's Services.yaml:

Configuration/Services.yaml
services:
  CPSIT\Typo3Handlebars\Renderer\Renderer:
    alias: Vendor\Extension\Renderer\MyRenderer
Copied!