31 $this->disableAfterDelivery = $value;
47 $this->iconPath =
$path;
54 public function setTitleVar($name, $parameters = array(), $language_module =
'notification') {
59 return $this->title->getName();
67 return $this->short_description->getName();
75 return $this->long_description->getName();
80 'title' => $this->title,
81 'longDescription' => $this->long_description,
82 'shortDescription' => $this->short_description,
95 $this->validForSeconds = $seconds;
118 final public function notifyByUsers(array $recipients, $processAsync =
false) {
119 require_once
'Services/Notifications/classes/class.ilNotificationSystem.php';
126 require_once
'Services/Notifications/classes/class.ilNotificationSystem.php';
133 require_once
'Services/Notifications/classes/class.ilNotificationSystem.php';
146 if ($languageVars[$this->title->getName()]->lang[$user->
getLanguage()]) {
149 else if ($languageVars[$this->title->getName()]->lang[$defaultLanguage]) {
150 $title = $languageVars[$this->title->getName()]->lang[$defaultLanguage];
153 $title = $this->title->getName();
156 if ($languageVars[$this->short_description->getName()]->lang[$user->
getLanguage()]) {
157 $short = $languageVars[$this->short_description->getName()]->lang[$user->
getLanguage()];
159 else if ($languageVars[$this->short_description->getName()]->lang[$defaultLanguage]) {
160 $short = $languageVars[$this->short_description->getName()]->lang[$defaultLanguage];
163 $short = $this->short_description->getName();
166 if ($languageVars[$this->long_description->getName()]->lang[$user->
getLanguage()]) {
167 $long = $languageVars[$this->long_description->getName()]->lang[$user->
getLanguage()];
169 else if ($languageVars[$this->long_description->getName()]->lang[$defaultLanguage]) {
170 $long = $languageVars[$this->long_description->getName()]->lang[$defaultLanguage];
173 $long = $this->long_description->getName();
176 $notificationObject->title =
$title;
177 $notificationObject->shortDescription = $short;
178 $notificationObject->longDescription = $long;
182 return $notificationObject;
186 if (strpos($name,
'.')) {
187 $nsParts = explode(
'.', $name, 2);
189 $field = $nsParts[1];
190 $this->handlerParams[$ns][$field] = $value;
193 $this->handlerParams[
''][$name] = $value;
202 unset($this->handlerParams[$name]);
232 $this->link = $this->baseNotification->getLink();
233 $this->linktarget = $this->baseNotification->getLinktarget();
234 $this->handlerParams = $this->baseNotification->getHandlerParams();
238 return array(
'title',
'shortDescription',
'longDescription',
'iconPath',
'link',
'linktarget',
'handlerParams');