diff --git a/Classes/Notification/EmailNotification.php b/Classes/Notification/EmailNotification.php index 208f42d..7222dd6 100644 --- a/Classes/Notification/EmailNotification.php +++ b/Classes/Notification/EmailNotification.php @@ -18,7 +18,8 @@ use TYPO3\CMS\Core\Mail\MailerInterface; use TYPO3\CMS\Core\Mail\MailMessage; use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Fluid\View\StandaloneView; +use TYPO3\CMS\Core\View\ViewFactoryData; +use TYPO3\CMS\Core\View\ViewFactoryInterface; use UnexpectedValueException; class EmailNotification implements LoggerAwareInterface @@ -114,14 +115,14 @@ protected function sendMail(string $to, string $subject, string $plainContent, s */ protected function getFluidTemplate(array $arguments, string $file, string $format = 'html'): string { - /** @var StandaloneView $renderer */ - $renderer = GeneralUtility::makeInstance(StandaloneView::class); - $renderer->setFormat($format); $path = GeneralUtility::getFileAbsFileName('EXT:t3monitoring/Resources/Private/Templates/Notification/' . $file); - $renderer->setTemplatePathAndFilename($path); - $renderer->assignMultiple($arguments); + $viewFactory = GeneralUtility::makeInstance(ViewFactoryInterface::class); + $view = $viewFactory->create( + new ViewFactoryData(templatePathAndFilename: $path, format: $format) + ); + $view->assignMultiple($arguments); - return trim($renderer->render()); + return trim($view->render()); } /** diff --git a/Configuration/Backend/Modules.php b/Configuration/Backend/Modules.php index 59bf70c..8ca1874 100644 --- a/Configuration/Backend/Modules.php +++ b/Configuration/Backend/Modules.php @@ -6,7 +6,7 @@ 't3monitoring' => [ 'parent' => 'tools', 'position' => ['top'], - 'access' => 'user,group', + 'access' => 'user', 'icon' => 'EXT:t3monitoring/Resources/Public/Icons/module.svg', 'labels' => 'LLL:EXT:t3monitoring/Resources/Private/Language/locallang_t3monitor.xlf', 'extensionName' => 't3monitoring', diff --git a/README.rst b/README.rst index bfdab92..ecd6111 100644 --- a/README.rst +++ b/README.rst @@ -130,9 +130,3 @@ Last but not least, the "Admin report" (Symfony Console Command: **reporting:adm The recipients email address needs to be configured as argument of the Symfony Console Command (respective the scheduled task). The frequency of the sent notification is also defined by the occurrence of the scheduled task. - - -Upgrade v14 todo -"""""""""""""""" - -* Check if StandaloneView can be replaced