3require_once 
'Services/Notifications/classes/class.ilNotificationSetupHelper.php';
 
    4require_once 
'Services/Notifications/classes/class.ilNotificationEchoHandler.php';
 
   50        $this->database->insert(
 
   53                    'notification_osd_id' => array(
'integer', 
$id),
 
   54                    'usr_id' => array(
'integer', $notification->user->getId()),
 
   55                    'serialized' => array(
'text', serialize($notification)),
 
   56                    'valid_until' => array(
'integer', $notification->baseNotification->getValidForSeconds() ? ($notification->baseNotification->getValidForSeconds() + time()) : 0),
 
   57                    'visible_for' => array(
'integer', $notification->baseNotification->getVisibleForSeconds() ? $notification->baseNotification->getVisibleForSeconds() : 0),
 
   58                    'type' => array(
'text', $notification->baseNotification->getType()),
 
   59                    'time_added' => array(
'integer', time()),
 
   66        $txt = 
new ilTextInputGUI($this->language->txt(
'polling_intervall'), 
'osd_polling_intervall');
 
   67        $txt->setRequired(
true);
 
   68        $txt->setInfo($this->language->txt(
'polling_in_seconds'));
 
   69        $txt->setValue(
'300');
 
   71        $item->addSubItem(
$txt);
 
   73        return array(
'osd_polling_intervall');
 
   83            . 
' WHERE usr_id = %s AND (valid_until = 0 OR valid_until > ' . 
$ilDB->quote(time(), 
'integer') . 
') AND time_added > %s';
 
   85        $types = array(
'integer', 
'integer');
 
   86        $values = array($user_id, $max_age_seconds ? (time() - $max_age_seconds) : 0);
 
   89        $notifications = array();
 
   92            $row[
'data'] = unserialize(
$row[
'serialized']);
 
   93            unset(
$row[
'serialized']);
 
   95            $row[
'data']->handlerParams = array(
'general' => 
$row[
'data']->handlerParams[
''], 
'osd' => 
$row[
'data']->handlerParams[
'osd']);
 
   97            if ($append_osd_id_to_link) {
 
   98                if (
$row[
'data']->link) {
 
  105            $notifications[] = 
$row;
 
  110        return $notifications;
 
  116        preg_match_all(
'/href="(.*?)"/', $subject, $matches);
 
  118            foreach ($matches[1] as $match) {
 
  120                $subject = str_replace($match, $match_appended, $subject);
 
  140        $types = array(
'integer');
 
  141        $values = array($notification_osd_id);
 
  147            $types = array(
'integer');
 
  148            $values = array($notification_osd_id);
 
  174        $rnd = rand(0, 10000);
 
  190        if (strpos($link, 
'?') !== 
false) {
 
  191            $link .= 
'&' . $param . 
'=' . $value;
 
  193            $link .= 
'?' . $param . 
'=' . $value;
 
An exception for terminatinating execution or to throw for unit testing.
Basic notification handler that dumps basic notification information to stdout.
Notification handler for senden a notification popup to the recipients browser.
static appendOsdIdToLinks($subject, $osd_id)
static removeNotification($notification_osd_id)
Removes a notifcation and triggers a follow up notification to remove the notification from the brows...
static cleanup()
Remove orphaned notifications.
static cleanupOnRandom()
Exec self::clean with a probability of 1%.
notify(ilNotificationObject $notification)
__construct(\ilDBInterface $database=null, \ilLanguage $language=null, \ILIAS\DI\Container $dic=null)
ilNotificationOSDHandler constructor.
static getNotificationsForUser($user_id, $append_osd_id_to_link=true, $max_age_seconds=0)
static appendParamToLink($link, $param, $value)
Helper to append an additional parameter to an existing url.
A concrete notification based on the ilNotificationConfiguration and returned by ilNotificationConfig...
static $tbl_notification_osd_handler
This class represents a text property in a property form.
if(!array_key_exists('StateId', $_REQUEST)) $id