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

[TASK] Removing unnecessary function

parent fe2b66bf
No related branches found
No related tags found
No related merge requests found
......@@ -72,8 +72,6 @@ class MailController extends ActionController {
$firstEntry = key(MailTemplateService::getRegisterArray());
$secondLevelFirstEntry = key(MailTemplateService::getRegisterArray()[$firstEntry]);
$templatePath = $this->getTemplatePath($selectedExtension, $selectedTemplate);
$activatedLanguages = $this->languageRepository->findSelected();
$languages = ['en'];
foreach ($activatedLanguages as $language) {
......@@ -254,29 +252,6 @@ class MailController extends ActionController {
return $template;
}
/**
* Returns the Path for this Template
*
* @param string $selectedExtension
* @param string $selectedTemplate
* @return string $templatePath
*/
private function getTemplatePath($selectedExtension, $selectedTemplate) {
$registerArray = MailTemplateService::getRegisterArray();
reset(MailTemplateService::getRegisterArray());
$firstEntry = key(MailTemplateService::getRegisterArray());
$secondLevelFirstEntry = key(MailTemplateService::getRegisterArray()[$firstEntry]);
$templatePath = MailTemplateService::getRegisterArray()
[$firstEntry][$secondLevelFirstEntry]['templatePath'];
if (isset($selectedTemplate)) {
$templatePath = $registerArray[$selectedExtension][$selectedTemplate]['templatePath'];
}
return $templatePath;
}
/**
* send a test email to a given address
* redirect to index action
......
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