diff --git a/Classes/View/MjmlBasedView.php b/Classes/View/MjmlBasedView.php index 4844cea..4a179b3 100644 --- a/Classes/View/MjmlBasedView.php +++ b/Classes/View/MjmlBasedView.php @@ -3,7 +3,6 @@ namespace Saccas\Mjml\View; use Saccas\Mjml\Domain\Renderer\RendererInterface; use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Object\ObjectManager; use TYPO3\CMS\Fluid\View\StandaloneView; use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; @@ -17,8 +16,7 @@ class MjmlBasedView extends StandaloneView $this->renderer = $renderer; if ($this->renderer === null) { - $objectManager = GeneralUtility::makeInstance(ObjectManager::class); - $this->renderer = $objectManager->get(RendererInterface::class); + $this->renderer = GeneralUtility::makeInstance(RendererInterface::class); } } diff --git a/Configuration/Services.yaml b/Configuration/Services.yaml new file mode 100755 index 0000000..756fee3 --- /dev/null +++ b/Configuration/Services.yaml @@ -0,0 +1,8 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Saccas\Mjml\: + resource: '../Classes/*'