82 $this->disableAfterDelivery = $value;
102 $this->iconPath =
$path;
120 public function setTitleVar($name, $parameters =
array(), $language_module =
'notification')
127 return $this->title->getName();
149 return $this->short_description->getName();
171 return $this->long_description->getName();
177 'title' => $this->title,
178 'longDescription' => $this->long_description,
179 'shortDescription' => $this->short_description,
195 $this->validForSeconds = $seconds;
245 require_once
'Services/Notifications/classes/class.ilNotificationSystem.php';
253 require_once
'Services/Notifications/classes/class.ilNotificationSystem.php';
261 require_once
'Services/Notifications/classes/class.ilNotificationSystem.php';
275 if($languageVars[$this->title->getName()]->lang[$user->
getLanguage()])
279 else if($languageVars[$this->title->getName()]->lang[$defaultLanguage])
281 $title = $languageVars[$this->title->getName()]->lang[$defaultLanguage];
285 $title = $this->title->getName();
288 if($languageVars[$this->short_description->getName()]->lang[$user->
getLanguage()])
290 $short = $languageVars[$this->short_description->getName()]->lang[$user->
getLanguage()];
292 else if($languageVars[$this->short_description->getName()]->lang[$defaultLanguage])
294 $short = $languageVars[$this->short_description->getName()]->lang[$defaultLanguage];
298 $short = $this->short_description->getName();
301 if($languageVars[$this->long_description->getName()]->lang[$user->
getLanguage()])
303 $long = $languageVars[$this->long_description->getName()]->lang[$user->
getLanguage()];
305 else if($languageVars[$this->long_description->getName()]->lang[$defaultLanguage])
307 $long = $languageVars[$this->long_description->getName()]->lang[$defaultLanguage];
311 $long = $this->long_description->getName();
314 $notificationObject->title =
$title;
315 $notificationObject->shortDescription = $short;
316 $notificationObject->longDescription = $long;
320 return $notificationObject;
325 if(strpos($name,
'.'))
327 $nsParts = explode(
'.', $name, 2);
329 $field = $nsParts[1];
330 $this->handlerParams[$ns][$field] = $value;
334 $this->handlerParams[
''][$name] = $value;
345 unset($this->handlerParams[$name]);
378 $this->baseNotification = $baseNotification;
381 $this->link = $this->baseNotification->getLink();
382 $this->linktarget = $this->baseNotification->getLinktarget();
383 $this->handlerParams = $this->baseNotification->getHandlerParams();
388 return array(
'title',
'shortDescription',
'longDescription',
'iconPath',
'link',
'linktarget',
'handlerParams');
404 public function __construct($name, $parameters =
array(), $language_module =
'notification')
407 $this->parameters = $parameters;
408 $this->language_module = $language_module;
418 return $this->parameters;
423 return $this->language_module;
setShortDescriptionVar($name, $parameters=array(), $language_module='notification')
Sets the name of the language variable to use as short description text.
setTitleVar($name, $parameters=array(), $language_module='notification')
Sets the name of the language variable to use as title.
A concrete notification based on the ilNotificationConfiguration and returned by ilNotificationConfig...
description of a localized parameter this information is used locate translations while processing no...
static sendNotificationToUsers(ilNotificationConfig $notification, $users, $processAsync=false)
hasDisableAfterDeliverySet()
__construct($name, $parameters=array(), $language_module='notification')
Describes a notification and provides methods for publishing this notification.
notifyByUsers(array $recipients, $processAsync=false)
sends this notification to a list of users
setHandlerParam($name, $value)
Create styles array
The data for the language used.
notifyByRoles(array $roles, $processAsync=false)
notifyByListeners($ref_id, $processAsync=false)
__construct(ilNotificationConfig $baseNotification, ilObjUser $user)
setVisibleForSeconds($visibleForSeconds)
setLinktarget($linktarget)
static sendNotificationToRoles(ilNotificationConfig $notification, array $roles, $processAsync=false)
static sendNotificationToListeners(ilNotificationConfig $notification, $ref_id, $processAsync=false)
getUserInstance(ilObjUser $user, $languageVars, $defaultLanguage)
getLanguage()
returns a 2char-language-string public
setLongDescriptionVar($name, $parameters=array(), $language_module='notification')
Sets the name of the language variable to use as long description text.
setValidForSeconds($seconds)