You are here

content_moderation_notifications.api.php in Content Moderation Notifications 8.2

Same filename and directory in other branches
  1. 8.3 content_moderation_notifications.api.php

Callbacks and hooks related to content_moderation_notifications.

File

content_moderation_notifications.api.php
View source
<?php

/**
 * @file
 * Callbacks and hooks related to content_moderation_notifications.
 */
use Drupal\Core\Entity\EntityInterface;

/**
 * Alter mail information before sending.
 *
 * Called by
 * Drupal\content_moderation_notifications\Notification::sendNotification().
 *
 * @param \Drupal\Core\Entity\EntityInterface $entity
 *   The moderated entity.
 * @param array $data
 *   The mail information.
 */
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';
}

Functions

Namesort descending Description
hook_content_moderation_notification_mail_data_alter Alter mail information before sending.