public static function HtmlMailHelper::getThemeNames in HTML Mail 8
Same name and namespace in other branches
- 8.3 src/Helper/HtmlMailHelper.php \Drupal\htmlmail\Helper\HtmlMailHelper::getThemeNames()
Retrieves the theme names based on module and key.
Parameters
array $message: The message array with module name and key.
Return value
array An array with themes name.
2 calls to HtmlMailHelper::getThemeNames()
- HTMLMailSystem::format in src/
Plugin/ Mail/ HTMLMailSystem.php - Format emails according to module settings.
- HTMLMailSystem::formatMailMime in src/
Plugin/ Mail/ HTMLMailSystem.php - Use the MailMime class to format the message body.
File
- src/
Helper/ HtmlMailHelper.php, line 123
Class
- HtmlMailHelper
- Class HtmlMailHelper.
Namespace
Drupal\htmlmail\HelperCode
public static function getThemeNames(array $message) {
$formatted_module = str_replace('_', '-', $message['module']);
$formatted_key = str_replace('_', '-', $message['key']);
return [
'htmlmail__' . $formatted_module,
'htmlmail__' . $formatted_module . '__' . $formatted_key,
'htmlmail',
];
}