You are here

function mimemail_example_theme in Mime Mail 8

Implements hook_theme().

File

modules/mimemail_example/mimemail_example.module, line 11
Hook implementations for the Mime Mail Example module.

Code

function mimemail_example_theme() {
  return [
    // Normally, templates are only found when they are put into a theme
    // directory. This demonstrates how to provide a template with a custom
    // module, by providing a new theme hook that will be used when sending
    // mail from this module.
    //
    // The template use for this email is found in
    // templates/mimemail-message--mimemail-example.html.twig.
    'mimemail_message__mimemail_example' => [
      'render element' => 'elements',
      'base hook' => 'mimemail_message',
    ],
  ];
}