82 $this->disableAfterDelivery = $value;
102 $this->iconPath =
$path;
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;
241 require_once
'Services/Notifications/classes/class.ilNotificationSystem.php';
249 require_once
'Services/Notifications/classes/class.ilNotificationSystem.php';
257 require_once
'Services/Notifications/classes/class.ilNotificationSystem.php';
271 if ($languageVars[$this->title->getName()]->lang[$user->
getLanguage()]) {
273 } elseif ($languageVars[$this->title->getName()]->lang[$defaultLanguage]) {
274 $title = $languageVars[$this->title->getName()]->lang[$defaultLanguage];
276 $title = $this->title->getName();
279 if ($languageVars[$this->short_description->getName()]->lang[$user->
getLanguage()]) {
280 $short = $languageVars[$this->short_description->getName()]->lang[$user->
getLanguage()];
281 } elseif ($languageVars[$this->short_description->getName()]->lang[$defaultLanguage]) {
282 $short = $languageVars[$this->short_description->getName()]->lang[$defaultLanguage];
284 $short = $this->short_description->getName();
287 if ($languageVars[$this->long_description->getName()]->lang[$user->
getLanguage()]) {
288 $long = $languageVars[$this->long_description->getName()]->lang[$user->
getLanguage()];
289 } elseif ($languageVars[$this->long_description->getName()]->lang[$defaultLanguage]) {
290 $long = $languageVars[$this->long_description->getName()]->lang[$defaultLanguage];
292 $long = $this->long_description->getName();
295 $notificationObject->title =
$title;
296 $notificationObject->shortDescription = $short;
297 $notificationObject->longDescription = $long;
301 return $notificationObject;
306 if (strpos(
$name,
'.')) {
307 $nsParts = explode(
'.',
$name, 2);
309 $field = $nsParts[1];
310 $this->handlerParams[$ns][$field] = $value;
312 $this->handlerParams[
''][
$name] = $value;
323 unset($this->handlerParams[
$name]);
355 $this->baseNotification = $baseNotification;
358 $this->link = $this->baseNotification->getLink();
359 $this->linktarget = $this->baseNotification->getLinktarget();
360 $this->handlerParams = $this->baseNotification->getHandlerParams();
365 return array(
'title',
'shortDescription',
'longDescription',
'iconPath',
'link',
'linktarget',
'handlerParams');
382 $this->parameters = $parameters;
383 $this->language_module = $language_module;
393 return $this->parameters;
398 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)