Elgg  Version master
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 }
Handle the queueing of delayed email notifications.
__invoke(\Elgg\Event $event)
Handle the 'sending' of the delayed email method.
Models an event passed to event handlers.
Definition: Event.php:11
Notification container.
$notification
Definition: body.php:13
_elgg_services()
Get the global service provider.
Definition: elgglib.php:353
if(parse_url(elgg_get_site_url(), PHP_URL_PATH) !=='/') if(file_exists(elgg_get_root_path() . 'robots.txt'))
Set robots.txt.
Definition: robots.php:10