You are here

public function DigestInterface::aggregate in Message Digest 8

Aggregate all of the messages for this digest.

Collect all messages for the digest's interval and notifier that haven't already been sent, and group them by user and then by group.

$aggregate = [
  '' => [
    // Non-grouped message digests here.
    12,
    24,
  ],
  'node' => [
    23 => [
      1,
      3,
      5,
    ],
  ],
];

Parameters

int $uid: The recipient's user ID for which to aggregate the digest.

int $end_time: The unix timestamp from which all messages in the past will be aggregated.

Return value

array An array of message IDs for the given user, keyed by entity_type, then by entity_id.

1 method overrides DigestInterface::aggregate()
DigestBase::aggregate in src/Plugin/Notifier/DigestBase.php
Aggregate all of the messages for this digest.

File

src/Plugin/Notifier/DigestInterface.php, line 42

Class

DigestInterface
Interface for sending messages as digests.

Namespace

Drupal\message_digest\Plugin\Notifier

Code

public function aggregate($uid, $end_time);