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