Elgg\Notifications\NotificationsService::sendNotifications PHP Method

sendNotifications() protected method

Returns an array in the form: [ 25 => [ 'email' => true, 'sms' => false, ], 55 => [], ]
protected sendNotifications ( Elgg\Notifications\NotificationEvent $event, array $subscriptions, array $params = [] ) : array
$event Elgg\Notifications\NotificationEvent Notification event
$subscriptions array Subscriptions for this event
$params array Default notification parameters
return array
    protected function sendNotifications($event, $subscriptions, array $params = [])
    {
        if (!$this->methods) {
            return 0;
        }
        $result = [];
        foreach ($subscriptions as $guid => $methods) {
            foreach ($methods as $method) {
                $result[$guid][$method] = false;
                if (in_array($method, $this->methods)) {
                    $result[$guid][$method] = $this->sendNotification($event, $guid, $method, $params);
                }
            }
        }
        $this->logger->notice("Results for the notification event {$event->getDescription()}: " . print_r($result, true));
        return $result;
    }