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

[TASK] add template list with user function in config

parent fa5e95a0
No related branches found
No related tags found
1 merge request!6Feature 4 3
<?php
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Class ExtensionConfiguration
*
* @package SGalinski\SgMail\UserFunc
*/
class ExtensionConfiguration {
/**
* Displays all registered sg mail templates for easy use with the blacklist feature
*
* @return string
*/
public function displayTemplates(): string {
$result = '';
try {
$registerArray = \SGalinski\SgMail\Service\MailTemplateService::getRegisterArray();
foreach ($registerArray as $extensionKey => $extension) {
/** @var array $extension */
foreach ($extension as $templateKey => $template) {
$result .= $extensionKey . '.' . $templateKey . '<br>';
}
}
} catch (Exception $exception) {
return 'TODO EXCEPTION MSG';
}
return $result;
}
}
......@@ -359,6 +359,10 @@ sg_comments.declined, sg_comments.approved
Die Templates declined und approved der Extension sg_comments sind für alle Domains auf der schwarzen Liste</target>
</trans-unit>
<trans-unit id="configuration.templateList" approved="yes">
<source>List of templates</source>
<target>Liste aller templates</target>
</trans-unit>
<trans-unit id="mlang_labels_tabdescr" approved="yes">
<source>Mail Templates</source>
<target>Mail-Templates</target>
......
......@@ -265,6 +265,9 @@ The templates declined and approved of the sg_comments extension are blacklisted
</source>
</trans-unit>
<trans-unit id="configuration.templateList">
<source>List of templates</source>
</trans-unit>
<trans-unit id="mlang_labels_tabdescr">
<source>Mail Templates</source>
</trans-unit>
......
......@@ -3,3 +3,6 @@ excludeTemplatesAllDomains =
# cat=general; type=string; label=LLL:EXT:sg_mail/Resources/Private/Language/locallang.xlf:configuration.excludeTemplates
excludeTemplates =
# cat=general; type=user[EXT:sg_mail/Classes/UserFunc/ExtensionConfiguration.php:ExtensionConfiguration->displayTemplates]; label=LLL:EXT:sg_mail/Resources/Private/Language/locallang.xlf:configuration.templateList
templates =
\ No newline at end of file
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