Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Classes/Notification/EmailNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Backend/Modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 0 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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