class MailHtmlTestHooks

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/mail_html_test/src/Hook/MailHtmlTestHooks.php \Drupal\mail_html_test\Hook\MailHtmlTestHooks

Hook implementations for mail_html_test.

Hierarchy

Expanded class hierarchy of MailHtmlTestHooks

File

core/modules/system/tests/modules/mail_html_test/src/Hook/MailHtmlTestHooks.php, line 12

Namespace

Drupal\mail_html_test\Hook
View source
class MailHtmlTestHooks {
  
  /**
   * Implements hook_mail().
   */
  public function mail($key, &$message, $params) : void {
    switch ($key) {
      case 'render_from_message_param':
        $message['body'][] = \Drupal::service('renderer')->renderInIsolation($params['message']);
        break;

    }
  }

}

Members

Title Sort descending Modifiers Object type Summary
MailHtmlTestHooks::mail public function Implements hook_mail().

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