MailHtmlTestHooks.php
Namespace
Drupal\mail_html_test\HookFile
-
core/
modules/ system/ tests/ modules/ mail_html_test/ src/ Hook/ MailHtmlTestHooks.php
View source
<?php
declare (strict_types=1);
namespace Drupal\mail_html_test\Hook;
use Drupal\Core\Hook\Attribute\Hook;
/**
* Hook implementations for mail_html_test.
*/
class MailHtmlTestHooks {
/**
* Implements hook_mail().
*/
public function mail($key, &$message, $params) {
switch ($key) {
case 'render_from_message_param':
$message['body'][] = \Drupal::service('renderer')->renderInIsolation($params['message']);
break;
}
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
MailHtmlTestHooks | Hook implementations for mail_html_test. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.