function hook_content_moderation_notification_mail_data_alter in Content Moderation Notifications 8.2
Same name and namespace in other branches
- 8.3 content_moderation_notifications.api.php \hook_content_moderation_notification_mail_data_alter()
Alter mail information before sending.
Called by Drupal\content_moderation_notifications\Notification::sendNotification().
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The moderated entity.
array $data: The mail information.
1 invocation of hook_content_moderation_notification_mail_data_alter()
- Notification::sendNotification in src/
Notification.php - Send notifications for a given entity and set of notifications.
File
- ./
content_moderation_notifications.api.php, line 21 - Callbacks and hooks related to content_moderation_notifications.
Code
function hook_content_moderation_notification_mail_data_alter(EntityInterface $entity, array &$data) {
// Add an extra email address to the list.
$data['to'][] = 'example@example.com';
}