Skip to content
Snippets Groups Projects
Commit 540f8a47 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Fixed misc todos

parent 02b6ae9e
No related branches found
No related tags found
1 merge request!1Feature sg mail
......@@ -43,11 +43,12 @@ class MailTemplateService {
private static $registerArray = [];
/**
* @todo Code-Dokumentation, Parameter vergessen bei param
* register a template with sg_mail
*
* @param string $extension
* @param string $extensionKey
* @param string $template
* @param string $templateName
* @param string $templatePath
* @param string $description
* @param array $marker
* @return string
*/
......@@ -69,7 +70,7 @@ class MailTemplateService {
}
/**
* @todo Code-Dokumentation
* Get all registered templates
*
* @return array
*/
......@@ -78,7 +79,7 @@ class MailTemplateService {
}
/**
* @todo Code-Dokumentation, Parameter vergessen bei param
* send an Email
*
* @param string $language
* @param string $templateKey
......@@ -86,7 +87,7 @@ class MailTemplateService {
* @param string $toAddress
* @param string $fromAddress
* @param string $subject
* @param string $content
* @param array $content
* @param boolean $ignoreMailQueue
*/
public static function sendEmail(
......@@ -98,8 +99,7 @@ class MailTemplateService {
$templateEntry = $registerArray[$extensionKey][$templateKey];
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
// @todo verwende bitte StandaloneView::class
$emailView = $objectManager->get('TYPO3\\CMS\\Fluid\\View\\StandaloneView');
$emailView = $objectManager->get(StandaloneView::class);
$emailView->setTemplatePathAndFilename($templateEntry['templatePath'] . $language . '.sg_mail.locallang.html');
$emailView->assignMultiple($content);
$emailBody = $emailView->render();
......
// @todo Warum sgcmail? Glaube das dies dadurch aktuell nicht genutzt wird. Normal ohne "c"
plugin.tx_sgcmail {
plugin.tx_sgmail {
view {
templateRootPath = EXT:sg_mail/Resources/Private/Templates/
partialRootPath = EXT:sg_mail/Resources/Private/Partials/
......
// @todo Warum sgcmail? Glaube das dies dadurch aktuell nicht genutzt wird. Normal ohne "c"
module.tx_sgcmail {
module.tx_sgmail {
view {
templateRootPath = {$plugin.tx_sgcmail.view.templateRootPath}
partialRootPath = {$plugin.tx_sgcmail.view.partialRootPath}
......
......@@ -4,23 +4,22 @@ if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
// @todo Muss auch noch in die "if (TYPO3_MODE === 'BE') {", weiß nicht ob es Probleme machen könnte.
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'SGalinski.sg_mail',
'web',
'Mail',
'',
[
'Mail' => 'index, save, sendTestMail',
],
[
'access' => 'admin,user,group',
'icon' => 'EXT:sg_mail/Resources/Public/Icons/ModuleIcon.svg',
'labels' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang.xlf',
]
);
if (TYPO3_MODE === 'BE') {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'SGalinski.sg_mail',
'web',
'Mail',
'',
[
'Mail' => 'index, save, sendTestMail',
],
[
'access' => 'admin,user,group',
'icon' => 'EXT:sg_mail/Resources/Public/Icons/ModuleIcon.svg',
'labels' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang.xlf',
]
);
$tables = [
'tx_sgmail_domain_model_mail',
];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment