function MailHtmlTestHooks::mail
Implements hook_mail().
File
-
core/
modules/ system/ tests/ modules/ mail_html_test/ src/ Hook/ MailHtmlTestHooks.php, line 17
Class
- MailHtmlTestHooks
- Hook implementations for mail_html_test.
Namespace
Drupal\mail_html_test\HookCode
public function mail($key, &$message, $params) {
switch ($key) {
case 'render_from_message_param':
$message['body'][] = \Drupal::service('renderer')->renderInIsolation($params['message']);
break;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.