mail_html_test.module

Same filename in other branches
  1. 9 core/modules/system/tests/modules/mail_html_test/mail_html_test.module
  2. 8.9.x core/modules/system/tests/modules/mail_html_test/mail_html_test.module
  3. 11.x core/modules/system/tests/modules/mail_html_test/mail_html_test.module

Helper module for the html mail and URL conversion tests.

File

core/modules/system/tests/modules/mail_html_test/mail_html_test.module

View source
<?php


/**
 * @file
 * Helper module for the html mail and URL conversion tests.
 */

/**
 * Implements hook_mail().
 */
function mail_html_test_mail($key, &$message, $params) {
    switch ($key) {
        case 'render_from_message_param':
            $message['body'][] = \Drupal::service('renderer')->renderInIsolation($params['message']);
            break;
    }
}

Functions

Title Deprecated Summary
mail_html_test_mail Implements hook_mail().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.