You are here

function mimemail_theme_suggestions_mimemail_message in Mime Mail 8

Implements hook_theme_suggestions_HOOK().

The template used is the one that is most specific. The theme system looks for templates starting at the end of the $hook array and works towards the beginning, so for the core user module's 'password_reset' email the order of precedence for selecting the template used will be: 1. mimemail-message--user--password-reset.html.twig 2. mimemail-message--user.html.twig 3. mimemail-message.html.twig Note that mimemail-message.html.twig is the default template for messages sent by the Mime Mail module, and will be used by default unless a more-specific template is found.

File

./mimemail.module, line 70
Hook implementations for the Mime Mail module.

Code

function mimemail_theme_suggestions_mimemail_message(array $variables) {
  return [
    'mimemail_message__' . $variables['module'],
    'mimemail_message__' . $variables['module'] . '__' . $variables['key'],
  ];
}