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

[TASK] Deprecate register functions

parent 253b4e91
No related branches found
No related tags found
1 merge request!11Feature security update
......@@ -802,9 +802,13 @@ class MailTemplateService {
* If found, register the template(s)
*
* @throws \BadFunctionCallException
* @deprecated since 4.7.0 will be removed in 5.0.0
* @return array
*/
public static function registerExtensions(): array {
// @TODO remove this deprecated function in version 5.0.0
self::logDeprecation('registerExtensions');
// clear registerArray
$registerArray = [];
......@@ -850,12 +854,16 @@ class MailTemplateService {
* @param array $configArray
* @param bool $transformTemplateFolder
* @param string $storeTemplateExtension
* @deprecated since 4.7.0 will be removed in 5.0.0
* @return array
*/
private static function writeRegisterArrayEntry(
array $registerArray, $extensionKey, $templateKey, array $configArray,
$transformTemplateFolder = TRUE, $storeTemplateExtension = ''
) {
// @TODO remove this deprecated function in version 5.0.0
self::logDeprecation('writeRegisterArrayEntry');
// If it is not explicitly set in which extension the html should be located, use the extension set in the template settings
if ($storeTemplateExtension === '') {
$storeTemplateExtension = $extensionKey;
......@@ -961,4 +969,15 @@ class MailTemplateService {
return $allMarker;
}
/**
* function to call a deprecation log entry (but only once per request / class)
*
* @param $function
*/
private static function logDeprecation($function) {
GeneralUtility::deprecationLog(
'The function ' . $function . ' is deprecated since version 4.7.0 and will be removed in version 5.0.0'
);
}
}
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