ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilNotificationConfig Class Reference
+ Collaboration diagram for ilNotificationConfig:

Public Member Functions

 __construct ($type)
 getType ()
 setAutoDisable ($value)
 hasDisableAfterDeliverySet ()
 setLink ($link)
 getLink ()
 setIconPath ($path)
 getIconPath ()
 setTitleVar ($name, $parameters=array(), $language_module= 'notification')
 getTitleVar ()
 setShortDescriptionVar ($name, $parameters=array(), $language_module= 'notification')
 getShortDescriptionVar ()
 setLongDescriptionVar ($name, $parameters=array(), $language_module= 'notification')
 getLongDescriptionVar ()
 getLanguageParameters ()
 getLinktarget ()
 setLinktarget ($linktarget)
 setValidForSeconds ($seconds)
 getValidForSeconds ()
 notifyByUsers (array $recipients, $processAsync=false)
 notifyByListeners ($ref_id, $processAsync=false)
 notifyByRoles (array $roles, $processAsync=false)
 getUserInstance (ilObjUser $user, $languageVars, $defaultLanguage)
 setHandlerParam ($name, $value)
 getHandlerParams ()
 unsetHandlerParam ($name)

Protected Member Functions

 beforeSendToUsers ()
 afterSendToUsers ()
 beforeSendToListeners ()
 afterSendToListeners ()

Private Attributes

 $type
 $link
 $linktarget = '_self'
 $title
 $iconPath
 $short_description
 $long_description
 $disableAfterDelivery = false
 $validForSeconds = 0
 $handlerParams = array()

Detailed Description

Definition at line 3 of file class.ilNotificationConfig.php.

Constructor & Destructor Documentation

ilNotificationConfig::__construct (   $type)

Definition at line 22 of file class.ilNotificationConfig.php.

References $type.

{
$this->type = $type;
}

Member Function Documentation

ilNotificationConfig::afterSendToListeners ( )
protected

Definition at line 114 of file class.ilNotificationConfig.php.

Referenced by notifyByListeners().

{
}

+ Here is the caller graph for this function:

ilNotificationConfig::afterSendToUsers ( )
protected

Definition at line 106 of file class.ilNotificationConfig.php.

Referenced by notifyByUsers().

{
}

+ Here is the caller graph for this function:

ilNotificationConfig::beforeSendToListeners ( )
protected

Definition at line 110 of file class.ilNotificationConfig.php.

Referenced by notifyByListeners().

{
}

+ Here is the caller graph for this function:

ilNotificationConfig::beforeSendToUsers ( )
protected

Definition at line 102 of file class.ilNotificationConfig.php.

Referenced by notifyByUsers().

{
}

+ Here is the caller graph for this function:

ilNotificationConfig::getHandlerParams ( )

Definition at line 197 of file class.ilNotificationConfig.php.

References $handlerParams.

{
}
ilNotificationConfig::getIconPath ( )

Definition at line 50 of file class.ilNotificationConfig.php.

References $iconPath.

{
}
ilNotificationConfig::getLanguageParameters ( )

Definition at line 78 of file class.ilNotificationConfig.php.

Referenced by ilNotificationSystem\toUsers().

{
return array(
'title' => $this->title,
'longDescription' => $this->long_description,
'shortDescription' => $this->short_description,
);
}

+ Here is the caller graph for this function:

ilNotificationConfig::getLink ( )

Definition at line 42 of file class.ilNotificationConfig.php.

References $link.

{
return $this->link;
}
ilNotificationConfig::getLinktarget ( )

Definition at line 86 of file class.ilNotificationConfig.php.

References $linktarget.

{
}
ilNotificationConfig::getLongDescriptionVar ( )

Definition at line 74 of file class.ilNotificationConfig.php.

{
return $this->long_description->getName();
}
ilNotificationConfig::getShortDescriptionVar ( )

Definition at line 66 of file class.ilNotificationConfig.php.

{
return $this->short_description->getName();
}
ilNotificationConfig::getTitleVar ( )

Definition at line 58 of file class.ilNotificationConfig.php.

{
return $this->title->getName();
}
ilNotificationConfig::getType ( )

Definition at line 26 of file class.ilNotificationConfig.php.

References $type.

Referenced by ilNotificationDatabaseHandler\enqueueByListener(), ilNotificationSystem\toListeners(), and ilNotificationSystem\toUsers().

{
return $this->type;
}

+ Here is the caller graph for this function:

ilNotificationConfig::getUserInstance ( ilObjUser  $user,
  $languageVars,
  $defaultLanguage 
)

Definition at line 139 of file class.ilNotificationConfig.php.

References $iconPath, $title, and ilObjUser\getLanguage().

Referenced by ilNotificationSystem\toUsers().

{
$notificationObject = new ilNotificationObject($this, $user);
$title = '';
$short = '';
$long = '';
if ($languageVars[$this->title->getName()]->lang[$user->getLanguage()]) {
$title = $languageVars[$this->title->getName()]->lang[$user->getLanguage()];
}
else if ($languageVars[$this->title->getName()]->lang[$defaultLanguage]) {
$title = $languageVars[$this->title->getName()]->lang[$defaultLanguage];
}
else {
$title = $this->title->getName();
}
if ($languageVars[$this->short_description->getName()]->lang[$user->getLanguage()]) {
$short = $languageVars[$this->short_description->getName()]->lang[$user->getLanguage()];
}
else if ($languageVars[$this->short_description->getName()]->lang[$defaultLanguage]) {
$short = $languageVars[$this->short_description->getName()]->lang[$defaultLanguage];
}
else {
$short = $this->short_description->getName();
}
if ($languageVars[$this->long_description->getName()]->lang[$user->getLanguage()]) {
$long = $languageVars[$this->long_description->getName()]->lang[$user->getLanguage()];
}
else if ($languageVars[$this->long_description->getName()]->lang[$defaultLanguage]) {
$long = $languageVars[$this->long_description->getName()]->lang[$defaultLanguage];
}
else {
$long = $this->long_description->getName();
}
$notificationObject->title = $title;
$notificationObject->shortDescription = $short;
$notificationObject->longDescription = $long;
$notificationObject->iconPath = $this->iconPath;
return $notificationObject;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilNotificationConfig::getValidForSeconds ( )

Definition at line 98 of file class.ilNotificationConfig.php.

References $validForSeconds.

Referenced by ilNotificationDatabaseHandler\enqueueByListener(), and ilNotificationDatabaseHandler\enqueueByUsers().

+ Here is the caller graph for this function:

ilNotificationConfig::hasDisableAfterDeliverySet ( )

Definition at line 34 of file class.ilNotificationConfig.php.

References $disableAfterDelivery.

Referenced by ilNotificationSystem\toListeners().

{
}

+ Here is the caller graph for this function:

ilNotificationConfig::notifyByListeners (   $ref_id,
  $processAsync = false 
)
final

Definition at line 125 of file class.ilNotificationConfig.php.

References $ref_id, afterSendToListeners(), beforeSendToListeners(), and ilNotificationSystem\sendNotificationToListeners().

{
require_once 'Services/Notifications/classes/class.ilNotificationSystem.php';
}

+ Here is the call graph for this function:

ilNotificationConfig::notifyByRoles ( array  $roles,
  $processAsync = false 
)
final

Definition at line 132 of file class.ilNotificationConfig.php.

References ilNotificationSystem\sendNotificationToRoles().

{
require_once 'Services/Notifications/classes/class.ilNotificationSystem.php';
//$this->beforeSendToListeners();
ilNotificationSystem::sendNotificationToRoles($this, $roles, $processAsync);
//$this->afterSendToListeners();
}

+ Here is the call graph for this function:

ilNotificationConfig::notifyByUsers ( array  $recipients,
  $processAsync = false 
)
final

Definition at line 118 of file class.ilNotificationConfig.php.

References afterSendToUsers(), beforeSendToUsers(), and ilNotificationSystem\sendNotificationToUsers().

{
require_once 'Services/Notifications/classes/class.ilNotificationSystem.php';
ilNotificationSystem::sendNotificationToUsers($this, $recipients, $processAsync);
$this->afterSendToUsers();
}

+ Here is the call graph for this function:

ilNotificationConfig::setAutoDisable (   $value)

Definition at line 30 of file class.ilNotificationConfig.php.

{
$this->disableAfterDelivery = $value;
}
ilNotificationConfig::setHandlerParam (   $name,
  $value 
)

Definition at line 185 of file class.ilNotificationConfig.php.

{
if (strpos($name, '.')) {
$nsParts = explode('.', $name, 2);
$ns = $nsParts[0];
$field = $nsParts[1];
$this->handlerParams[$ns][$field] = $value;
}
else {
$this->handlerParams[''][$name] = $value;
}
}
ilNotificationConfig::setIconPath (   $path)

Definition at line 46 of file class.ilNotificationConfig.php.

References $path.

{
$this->iconPath = $path;
}
ilNotificationConfig::setLink (   $link)

Definition at line 38 of file class.ilNotificationConfig.php.

References $link.

{
$this->link = $link;
}
ilNotificationConfig::setLinktarget (   $linktarget)

Definition at line 90 of file class.ilNotificationConfig.php.

References $linktarget.

{
$this->linktarget = $linktarget;
}
ilNotificationConfig::setLongDescriptionVar (   $name,
  $parameters = array(),
  $language_module = 'notification' 
)

Definition at line 70 of file class.ilNotificationConfig.php.

{
$this->long_description = new ilNotificationParameter($name, $parameters, $language_module);
}
ilNotificationConfig::setShortDescriptionVar (   $name,
  $parameters = array(),
  $language_module = 'notification' 
)

Definition at line 62 of file class.ilNotificationConfig.php.

{
$this->short_description = new ilNotificationParameter($name, $parameters, $language_module);
}
ilNotificationConfig::setTitleVar (   $name,
  $parameters = array(),
  $language_module = 'notification' 
)

Definition at line 54 of file class.ilNotificationConfig.php.

{
$this->title = new ilNotificationParameter($name, $parameters, $language_module);
}
ilNotificationConfig::setValidForSeconds (   $seconds)

Definition at line 94 of file class.ilNotificationConfig.php.

{
$this->validForSeconds = $seconds;
}
ilNotificationConfig::unsetHandlerParam (   $name)

Definition at line 201 of file class.ilNotificationConfig.php.

{
unset($this->handlerParams[$name]);
}

Field Documentation

ilNotificationConfig::$disableAfterDelivery = false
private

Definition at line 17 of file class.ilNotificationConfig.php.

Referenced by hasDisableAfterDeliverySet().

ilNotificationConfig::$handlerParams = array()
private

Definition at line 20 of file class.ilNotificationConfig.php.

Referenced by getHandlerParams().

ilNotificationConfig::$iconPath
private

Definition at line 12 of file class.ilNotificationConfig.php.

Referenced by getIconPath(), and getUserInstance().

ilNotificationConfig::$link
private

Definition at line 7 of file class.ilNotificationConfig.php.

Referenced by getLink(), and setLink().

ilNotificationConfig::$linktarget = '_self'
private

Definition at line 8 of file class.ilNotificationConfig.php.

Referenced by getLinktarget(), and setLinktarget().

ilNotificationConfig::$long_description
private

Definition at line 15 of file class.ilNotificationConfig.php.

ilNotificationConfig::$short_description
private

Definition at line 14 of file class.ilNotificationConfig.php.

ilNotificationConfig::$title
private

Definition at line 10 of file class.ilNotificationConfig.php.

Referenced by getUserInstance().

ilNotificationConfig::$type
private

Definition at line 5 of file class.ilNotificationConfig.php.

Referenced by __construct(), and getType().

ilNotificationConfig::$validForSeconds = 0
private

Definition at line 18 of file class.ilNotificationConfig.php.

Referenced by getValidForSeconds().


The documentation for this class was generated from the following file: