Template rendering

Since exception handling may happen on a very low level where TYPO3 bootstrapping is not completed yet, this extension ships with a very generic template renderer.

class TemplateRenderer
Fully qualified name
\EliasHaeussler\Typo3Solver\View\TemplateRenderer

Generic low-level renderer for Fluid templates shipped with EXT:solver. This class is not intended for use anywhere else than in the extension itself.

render ( $templatePath, $variables = [])

Render a given template with optional variables. The template path must be relative to EXT:solver/Resources/Private/Templates.

param string $exception

Path to the template to be rendered

param array $variables

Optional template variables

returntype

string

View helpers

The extension provides two additional view helpers.

class DateViewHelper
Fully qualified name
\EliasHaeussler\Typo3Solver\ViewHelpers\DateViewHelper

View helper to format a given date, either by a fixed format ( d.m.Y H:i:s) or as human readable relative date.

Examples:

<solver:date date="{date}" /> <!-- 12.04.2023 19:51:02 -->
Copied!
<solver:date date="{date}" readable="1" /> <!-- 2 hours ago -->
Copied!
class MarkdownToHtmlViewHelper
Fully qualified name
\EliasHaeussler\Typo3Solver\ViewHelpers\MarkdownToHtmlViewHelper

View helper to convert a given Markdown string to HTML. It uses the erusev/parsedown library internally. In addition, resolved HTML can also be modified by replacing line numbers in code snippets to match the expected structure of code examples on error pages.

Examples:

<solver:markdownToHtml markdown="{markdown}" />
Copied!
<solver:markdownToHtml markdown="{markdown}" replaceLineNumbersInCodeSnippets="1" />
Copied!