class MailCancelTestHooks
Hook implementations for mail_cancel_test.
Hierarchy
- class \Drupal\mail_cancel_test\Hook\MailCancelTestHooks
Expanded class hierarchy of MailCancelTestHooks
File
-
core/
modules/ system/ tests/ modules/ mail_cancel_test/ src/ Hook/ MailCancelTestHooks.php, line 12
Namespace
Drupal\mail_cancel_test\HookView source
class MailCancelTestHooks {
/**
* Implements hook_mail_alter().
*
* Aborts sending of messages with ID 'mail_cancel_test_cancel_test'.
*
* @see MailTestCase::testCancelMessage()
*/
public function mailAlter(&$message) {
if ($message['id'] == 'mail_cancel_test_cancel_test') {
$message['send'] = FALSE;
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
MailCancelTestHooks::mailAlter | public | function | Implements hook_mail_alter(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.