Elgg  Version 6.1
EnqueueHandler.php
Go to the documentation of this file.
1 <?php
2 
4 
6 
14 
22  public function __invoke(\Elgg\Event $event): ?bool {
23  if ($event->getValue() === true) {
24  // assume someone else already sent the message
25  return null;
26  }
27 
28  $notification = $event->getParam('notification');
29  if (!$notification instanceof Notification) {
30  return false;
31  }
32 
33  return _elgg_services()->delayedEmailService->enqueueNotification($notification);
34  }
35 }
__invoke(\Elgg\Event $event)
Handle the &#39;sending&#39; of the delayed email method.
Notification container.
$notification
Definition: body.php:13
_elgg_services()
Get the global service provider.
Definition: elgglib.php:353
Handle the queueing of delayed email notifications.
Models an event passed to event handlers.
Definition: Event.php:11