You are here

NotificationInterface.php in Content Moderation Notifications 8.2

Same filename and directory in other branches
  1. 8.3 src/NotificationInterface.php

File

src/NotificationInterface.php
View source
<?php

namespace Drupal\content_moderation_notifications;

use Drupal\Core\Entity\EntityInterface;

/**
 * Interface for notification service.
 */
interface NotificationInterface {

  /**
   * Send notifications for a given entity and set of notifications.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The entity we may be moderating.
   * @param \Drupal\content_moderation_notifications\ContentModerationNotificationInterface[] $notifications
   *   List of content moderation notification entities.
   *
   * @return bool
   *   TRUE if this entity is moderated, FALSE otherwise.
   */
  public function sendNotification(EntityInterface $entity, array $notifications);

}

Interfaces

Namesort descending Description
NotificationInterface Interface for notification service.