/** * Sends the notification to all listener which are subscribed to the given * ref_id * * @param ilNotificationConfig $notification * @param type $ref_id * @param type $processAsync */ private function toListeners(ilNotificationConfig $notification, $ref_id, $processAsync = false) { require_once 'Services/Notifications/classes/class.ilNotificationUserIterator.php'; require_once 'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php'; if ($processAsync == false) { $users = ilNotificationDatabaseHandler::getUsersByListener($notification->getType(), $ref_id); self::toUsers($notification, $users, false); if ($notification->hasDisableAfterDeliverySet()) { ilNotificationDatabaseHandler::disableListeners($notification->getType(), $ref_id); } } else { ilNotificationDatabaseHandler::enqueueByListener($notification, $ref_id); } }