Elgg  Version master
EnqueueEventHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Notifications;
4 
11 
24  public function __invoke(\Elgg\Event $event) {
25  $object = $event->getObject();
26  if (!$object instanceof \ElggData) {
27  return;
28  }
29 
30  _elgg_services()->notifications->enqueueEvent($event->getName(), $object);
31  }
32 }
__invoke(\Elgg\Event $event)
Queue a notification event for later handling.
A generic class that contains shared code among , , and .
Definition: ElggData.php:10
if($email instanceof\Elgg\Email) $object
Definition: body.php:24
_elgg_services()
Get the global service provider.
Definition: elgglib.php:351
Models an event passed to event handlers.
Definition: Event.php:11