mirror of
https://github.com/saccas/mjml-typo3.git
synced 2024-12-22 23:06:09 +01:00
[WIP] v11: fix DI
This commit is contained in:
parent
254a970468
commit
8fa50c3089
2 changed files with 9 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
8
Configuration/Services.yaml
Executable file
8
Configuration/Services.yaml
Executable file
|
@ -0,0 +1,8 @@
|
|||
services:
|
||||
_defaults:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
public: false
|
||||
|
||||
Saccas\Mjml\:
|
||||
resource: '../Classes/*'
|
Loading…
Reference in a new issue