mjml-typo3/Classes/View/MjmlBasedView.php
Daniel Siepmann c45dee45b0
[TASK] Update MJML and clean up parts of the extension for new release (#31)
Use one functional test to ensure everything works,
no unit tests with heavy mocking.

Update mjml to fix security issues and allow new options.

Provide GitHub Actions. This is a public extension with free minutes
which should ensure that existing setup still works.
2022-09-15 15:58:08 +02:00

29 lines
664 B
PHP

<?php
declare(strict_types=1);
namespace Saccas\Mjml\View;
use Saccas\Mjml\Domain\Renderer\RendererInterface;
use TYPO3\CMS\Fluid\View\StandaloneView;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
class MjmlBasedView extends StandaloneView
{
protected RendererInterface $renderer;
public function __construct(
ContentObjectRenderer $contentObject,
RendererInterface $renderer
) {
parent::__construct($contentObject);
$this->renderer = $renderer;
}
public function render($actionName = null): string
{
return $this->renderer->getHtmlFromMjml(parent::render($actionName));
}
}