function content_moderation_notifications_test_content_moderation_notification_mail_data_alter in Content Moderation Notifications 8.3
Implements hook_content_moderation_notifications_mail_data_alter().
File
- tests/
modules/ content_moderation_notifications_test/ content_moderation_notifications_test.module, line 13 - Hook implementations for the content moderation notifications test module.
Code
function content_moderation_notifications_test_content_moderation_notification_mail_data_alter(EntityInterface $entity, array &$data) {
if (\Drupal::state()
->get('content_moderation_notifications_test.alter', FALSE)) {
// Change mails to verify this hook has been called.
$data['to'] = [
'altered@example.com',
'foo' . $entity
->id() . '@example.com',
];
}
}